LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Lighttpd + php_cgi = 403 Forbidden? (https://www.linuxquestions.org/questions/linux-server-73/lighttpd-php_cgi-%3D-403-forbidden-4175444582/)

alienDog 01-07-2013 06:49 PM

Lighttpd + php_cgi = 403 Forbidden?
 
I installed lighttpd+php-cgi to a Debian Squeeze server, and ran "lighty-enable-mod fastcgi-php" and then "/etc/init.d/lighttpd force-reload". The result is that all the php files just give me "403 - forbidden".

"lighty-enable-mod fastcgi-php" added a file called "15-fastcgi-php.conf" to /etc/lighttpd/conf-enabled. The file looks like this:

Code:

# /usr/share/doc/lighttpd-doc/fastcgi.txt.gz
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi

## Start an FastCGI server for php (needs the php5-cgi package)
fastcgi.server += ( ".php" =>
        ((
                "bin-path" => "/usr/bin/php-cgi",
                "socket" => "/tmp/php.socket",
                "max-procs" => 1,
                "bin-environment" => (
                        "PHP_FCGI_CHILDREN" => "4",
                        "PHP_FCGI_MAX_REQUESTS" => "10000"
                ),
                "bin-copy-environment" => (
                        "PATH", "SHELL", "USER"
                ),
                "broken-scriptfilename" => "enable"
        ))
)

In /var/log/lighttpd/error.log it says:

Code:

(log.c.166) server started
(server.c.961) WARNING: unknown config-key: fastcgi.server (ignored)

In addition to that I have done no other configuration procedures. HTML files work fine, but php's don't. The scripts reside under /var/www/ and are owned by www-data:www-data (exactly like the html files too). The permissions should also be sufficient (-rw-r--r--). Any help?

--Edit--

And immediately after posting I got it fixed. You also need to enable module fastcgi in addition to fastcgi-php :D

EricTRA 01-08-2013 12:33 AM

Hello,

Thanks for sharing your solution and marking the thread as solved. Off the Zero Reply List.

Kind regards,

Eric


All times are GMT -5. The time now is 01:13 AM.