I set up a Debian 6 VPS to host couple of small sites and it works beautifully for default one.
Next i created new user and copy/paste default vhost file and enabled it with a2ensite and only adjusted paths accordingly for that new user but for some reason PHP files aren't parsed and only their source is displayed.
So, recap: identical vhost settings, PHP module enabled, short tags on (but not used)
To make it clear: I search and found bunch of "solutions" here and on the web elsewhere but none of those seemed to work for me.
Just noticed this string in logs :
PHP Fatal error: Unknown: Failed opening required '/home/tester/public_html/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0 [Thu Mar 21 20:28:55 2013] [error] [client xxx.xxx.xxx.xxx] PHP Warning: Unknown: open_basedir restriction in effect. File(/home/tester/public_html/index.php) is not within the allowed path(s): (/home/user/public_html:/tmp) in Unknown on line 0
And this is my default vhost file content:
<VirtualHost *:80> ServerAdmin firstname.lastname@example.org ServerName domain.com ServerAlias www.domain.com DocumentRoot /home/user/public_html/ ErrorLog /home/user/logs/error.log CustomLog /home/user/logs/access.log combined <Directory "/home/user/public_html"> AllowOverride All php_admin_flag engine on php_admin_value open_basedir "/home/user/public_html:/tmp" </Directory> </VirtualHost>
Could PHP's open_basedir be the culprit of this issue?