I have some software installed that symlinks from /var/www/xxxxx to pages elsewhere.
I can't see how to get PHP to parse these files, it only seems to do it within /var/www
I am sure this is obvious to someone smarter than me!
Any ideas?
Printable View
I have some software installed that symlinks from /var/www/xxxxx to pages elsewhere.
I can't see how to get PHP to parse these files, it only seems to do it within /var/www
I am sure this is obvious to someone smarter than me!
Any ideas?
An update....
It is parsing now in the same folder but only the file i create. The softwares files still insist on downloading instead. Same user:group for all.
Ain't it finding the file, or ain't it running the script and instead showing it to you?
One thing you could try to do would be to configure apache to look at the pages elsewhere rather than symlinking from /var. It's probably a PHP configuration issue. More information would be useful.
For a Debian or Ubuntu or related distro, look for an example in /etc/apache2/conf.d/apache2-doc - this provides an alias allowing access as Apache HTTP Server Version 2.2 Documentation - Apache HTTP Server to the actual manual directory, and then allows symlinks under that directory.
Alias /manual /usr/share/doc/apache2-doc/manual/
<Directory "/usr/share/doc/apache2-doc/manual/">
Options Indexes FollowSymlinks
AllowOverride None
Order allow,deny
Allow from all
AddDefaultCharset off
</Directory>
The FollowSymlinks directive is what you want.
Another related issue is enabling PHP in user directories (like http://myserver/~mylogin/somefile.php)
For this you should enable php and userdir in /etc/apache2/mods-enabled, using the a2enmod utility or the ln command to link to the module in /etc/apache2/mods-available.
THEN, in /etc/apache2/mods-enabled/, comment out the lines below:
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
# <IfModule mod_userdir.c>
# <Directory /home/*/public_html>
# php_admin_value engine Off
# </Directory>
# </IfModule>
</IfModule>
and restart Apache2