Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 01-07-2013, 06:49 PM   #1
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 46
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:

# /usr/share/doc/lighttpd-doc/fastcgi.txt.gz

## 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:

(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?


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

Last edited by alienDog; 01-07-2013 at 06:58 PM. Reason: Solved
Old 01-08-2013, 12:33 AM   #2
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295

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

Kind regards,



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
403 forbidden kpsajeer General 5 08-24-2011 02:18 PM
"lighttpd" giving 403 Forbidden error nishith Linux - Server 2 05-29-2010 11:32 AM
Forbidden 403 cov Linux - Server 9 03-04-2010 01:21 PM
403 Forbidden JanDeMan Linux - Newbie 7 04-12-2004 03:02 PM
403 Forbidden??? morbo Linux - Networking 11 07-04-2002 10:17 AM

All times are GMT -5. The time now is 11:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration