I played with lighttpd web server on my Fedora core 10 Slice and I was getting the annoying Error 403 error while accessing a simple phpinfo file.

Solution:
Login as root

[code]
vi /etc/lighttpd/lighttpd.conf
[/code]

Enable modules:

[code]
"mod_fastcgi"
"mod_simple_vhost"
[/code]

Setup a site and creates folders if they do not exist

[code]
simple-vhost.server-root   = "/var/www/vhosts/"
simple-vhost.default-host  = "domain.com"
simple-vhost.document-root = "/htdocs/"
[/code]

Enable fastcgi
[code]
#### fastcgi module
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi"
)
)
)
[/code]

Also look for "url.access-deny" and make sure it does not contain a .php extension.

Restart the lighttpd server

[code]
/etc/init.d/lighttpd restart
[/code]

I assume that you've already executed

Disable apache and install

[code]
service httpd stop
chkconfig httpd off

yum install lighttpd
chkconfig lighttpd on
[/code]

Referral Note: When you purchase through a referral link (if any) on this page, we may earn a commission.
If you're feeling thankful, you can buy me a coffee or a beer