I am trying to write about 5 sites on one Apache server, which is on the same IP address.
For example:
- / var / www / site1
- / var / www / site2
- / var / www / site3
- / var / www / site4
- / var / www / site5
However, if I create a link on site 2, simply using, for example. /index.php, you expect it to look in / var / www / site 2 / index.php ... but it actually resolves /var/www/index.php.
Is there a way to configure Apache to know that individual site folders should behave and allow separate folders?
This is my available file at the moment. I suppose a pretty standard setup:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
Any help would be appreciated.
Thank you.
Andrew Barlow
source
share