Forum Moderators: phranque
Using Apache2 on Linux, I get a "403 Forbidden" error only when I
access PHP files:
[domain.com...]
but it works fine with HTML files
[domain.com...]
In addition, PHP scripts work fine on root directory (outside Alias
directories):
[domain.com...] WORKS OK
I don't see any information on error logs, and I've got no idea about
how to fix this.
This is my "httpd.conf" configuration
---------
Alias /foo/ /var/www/httpdocs/modules/foo/web/
<Directory "/var/www/httpdocs/modules/foo/web/">
Options Indexes FollowSymLinks
Order Allow,Deny
Allow from all
AllowOverride all
DirectoryIndex index.php
</Directory>
---------
Any suggestion? Thank you very much,
[Fri Feb 22 11:27:45 2008] [error] [client 183.10.52.18] Premature end
of script headers: hello.php, referer: [domain.com...]
--------------------------------------------
AddHandler fcgid-script .php .php5
SuexecUserGroup myuser psacln
DocumentRoot "/var/www/httpdocs/web"
ErrorLog /etc/httpd/logs/dev_error_log
<Directory "/var/www/httpdocs/web">
Options ExecCGI Indexes FollowSymLinks
AllowOverride All
Allow from all
FCGIWrapper /var/www/bin/php5 .php5
FCGIWrapper /var/www/bin/php5 .php
Order Allow,Deny
</Directory>
-----------------------------
Facts:
- I did: []# chown -R myuser /var/www
- I did: []# chgrp -R psacln /var/www
- I did: []# chmod -R 755 /var/www (so everybody can execute and read
all the files)
- 'psacln' group does exist in '/etc/group'
- 'myuser' user does exist in '/etc/passwd'
- '/var/www/bin/php5' does exist