So my localhost server has never had a problem because I've never been developing with other people on multiple websites.
Now, however, accessing a secondary site via an Alias
is running into a problem as the primary site's (drupal) redirect kicks in and returns a 404. It works fine using a domain from hosts.
The primary site localhost
is at ~/www
, the secondary site localhost/second
is at ~/second
The second site's config file is as such:
# Allow lan to access the site without modifying their hosts files
Alias /second /home/j/second
<VirtualHost *:80>
ServerAdmin webmaster@localhost
# Allow me to access it from domain in hosts file
ServerName second.local
# And when I do that undo the alias
Alias /second /home/j/second/second
DocumentRoot /home/j/second
<Directory /home/j/second>
Options FollowSymLinks
AllowOverride All
Order deny,allow
deny from all
allow from 192.168.1
allow from 127.0.0.1
</Directory>
</VirtualHost>
What is actually happening:
localhost
should load
~/www
and loads
~/www
localhost/second
should load
~/second
and loads
~/second
localhost/second/about
should load
~/second/index.php?q=about
but instead loads
~/www/index.php?q=second/about
How do I get it to respond as expected?