I've been having this problem for a while and still can't come up with a proper solution - I want to include files from directories within /var/www
from my Apache server. This isn't a problem whenever I'm including anything from any of the directories within /var/www
but my subdomain (also coming from a directory in /var/www
) isn't behaving well.
Here's the virtualhost config
<VirtualHost *:80>
ServerName support.cruisetouch.com
ServerAlias cruisetouch.com/Support
ServerRoot /var/www/
DocumentRoot /var/www/html/Support
<Directory /var/www/html/Support>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
I usually include files with PHP like so:
include $_SERVER["DOCUMENT_ROOT"]."/_INCLUDES/Header.php"; ?>
and they would be pulled from the /var/www/_INCLUDES
directory, but whenever I use this line of code in /var/www/Support
(the subdomain directory) it thinks that I'm looking within THAT directory.
How can I include files from /var/www
without it treating /var/www/Support
as the document root? Linking directly to the files isn't an option either.
Any support is greatly appreciated.
Running Apache on Ubuntu.