Lighttpd PHP Error: 403 - Forbidden

I am trying to configure a web server using lighttpd for windows. After installing PHP, every time I try to access the PHP file from the "htdocs" directory, I get the error message: "403 - Forbidden." I went through this guide to install lighttpd: http://joshdick.net/writing/lighttpd . I searched Google but did not find any good documentation on this issue. FYI: I'm new to this. I have the contents of my lighttpd-inc.conf file here .

Any help would be greatly appreciated. Thank!

+3
source share
2 answers

It can be a lot. For example, if you use FastCGI on Windows, a problem may arise (they do not play well). It can be as simple as permissions to access a folder (on Windows) do not allow access to this folder. However, trying to view your .conf file (the absence of line breaks makes it a bear to read), I have a place where you can start looking.

It looks like you are incorrectly referencing the path to htdocs. For example, this line is here:

server.document-root = "HTDOCS/"

I do not think this path will work correctly. Usually you should have the style path / HTDOCS /. There are several lines throughout your file. Here is a link to some documentation about this:

http://redmine.lighttpd.net/wiki/1/server.document-rootdetails

+1
source

cgi/fcgi php . CGI FCGI - , PHP lighttpd . lighttpd error.log - :

(mod_fastcgi.c.1397) [ERROR]: spawning fcgi failed. 

i :

fastcgi.server = ( ".php" => ((                                      
                     "bin-path" => "/bin/php-cgi",             
                     "socket" => "/tmp/php.socket",              
                     "max-procs" => 1,                                     
                     "bin-environment" => (                         
                       "PHP_FCGI_CHILDREN" => "16",                    
                       "PHP_FCGI_MAX_REQUESTS" => "10000"           
                     ),         
                     "broken-scriptfilename" => "enable"
                 )))   

, fastcgi modules.conf

server.modules = (
  "mod_access",
  "mod_fastcgi",
#  "mod_alias",
#  "mod_auth",
#  "mod_evasive",
#  "mod_redirect",
#  "mod_rewrite",
#  "mod_setenv",
#  "mod_usertrack",
)
0

All Articles