I accessed the sub-folder of my website and got this error:
PHP Warning: include_once(): Failed opening '/var/www/html//include/version.inc' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /srv/sparrow/php/include/branches.inc on line 3
It seems that $_SERVER['DOCUMENT_ROOT'] return a wrong directory like this:
/var/www/html/
If I access www.my.website/php, this should be the expected directory that the $_SERVER['DOCUMENT_ROOT'] should return:
/var/www/html/php/
These are my virtualhost configurations:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.mywebsite.com
DocumentRoot /var/www/html/
<Directory /var/www/html/>
Options -Indexes -MultiViews
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.mywebsite.com/ph
# Webroot of PHP site
DocumentRoot /var/www/html/php/
<Directory /var/www/html/php/>
Options -Indexes -MultiViews
</Directory>
</VirtualHost>
How can I configure my virtualhost configurations such that if I access www.my.website/php it should return the DocumentRoot with value /var/www/html/php/ ?
Thanks guys!