3

i have newly installed lighttpd in ubuntu 9.10 first it showed the detault page and i changed the permission of /var/www/ directory to 777 and now its saying 403 forbidden

my php-cgi -v

PHP 5.2.10-2ubuntu6.4 with Suhosin-Patch 0.9.7 (cgi-fcgi) (built: Jan  6 2010 22:34:28)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

php -v

PHP 5.2.10-2ubuntu6.4 with Suhosin-Patch 0.9.7 (cli) (built: J
6) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

and i have added these line in lighttpd.conf file

fastcgi.server = ( ".php" => ((
                     "bin-path" => "/usr/bin/php-cgi",
                     "socket" => "/tmp/php.socket"
                 )))

still getting same error....

quanta
  • 51,413
  • 19
  • 159
  • 217

2 Answers2

1

Most probably the user you are running Lighttpd on doesn't have access to /var/

TheOnly92
  • 115
  • 2
1

A couple suggestions about what might be wrong:

Permissions on the directory /var/www are 777 (a bad practice, by the way) - but are the subdirectories all readable by the web server?

Check your php error log and your lighttpd error log. (They may be the same file, depending on your php configuration). Are there any errors in the log about permissions, or about anything else?

Is php-cgi running? Check to make sure that it has permission to write to the socket in /tmp, and that lighttpd does as well.

Check your lighttpd configuration. Do you have access rules that may be causing you to get a forbidden message?

Scrivener
  • 3,116
  • 1
  • 22
  • 24