Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Why do all my Virtual Hosts Route Back to The Same Document |
|
Author |
|
vincej
Joined: 07 Oct 2014 Posts: 3 Location: Canada,Calgary
|
Posted: Tue 07 Oct '14 18:24 Post subject: Why do all my Virtual Hosts Route Back to The Same Document |
|
|
Hi - I am trying to configure Apache 2.2 on Linux Mint 17 ( derived from Ubuntu 14 LTS).
I am wanting to create a variety of localhost sites all for development. One of those is built on Laravel 4. I have followed every tutorial I can find yet, for some reason which I do not understand ALL my sites route back to the Laravel root document when called from the browser. Just don't get it. Can anyone help me see where things are wrong ?
MANY THANKS ! I have been messing with this for 2 days !
Here is my hosts file:
Code: | 127.0.0.1 localhost
127.0.1.1 vince-XPS-8300
127.0.0.1 auburntree
127.0.0.1 example
|
Here is the Laravel conf file:
Code: | NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin mail@shaw.ca
ServerName auburntree
DocumentRoot /var/www/auburntree/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost> |
Here is the alternative "example" conf file with just "hello world" in it.
Code: |
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin mail@shaw.ca
ServerName example
DocumentRoot /var/www/example/test.html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost> |
Both conf files have been enabled. |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
Posted: Tue 07 Oct '14 18:45 Post subject: |
|
|
Try this.
In your hosts:
127.0.0.123 auburntree
And in your conf-files:
Code: | NameVirtualHost 127.0.0.123:80
<VirtualHost 127.0.0.123:80>
ServerAdmin mail@shaw.ca
ServerName auburntree
DocumentRoot /var/www/auburntree/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
|
And more like this for the other internal sites. |
|
Back to top |
|
vincej
Joined: 07 Oct 2014 Posts: 3 Location: Canada,Calgary
|
Posted: Tue 07 Oct '14 19:45 Post subject: |
|
|
I changed auburntree as you recommended. I checked it twice, restarted Apache and nope - the browser comes back with "page not available"
Additionally, "example" now also comes back with a 404.
Any ideas ?
Many thanks ! |
|
Back to top |
|
vincej
Joined: 07 Oct 2014 Posts: 3 Location: Canada,Calgary
|
Posted: Tue 07 Oct '14 20:30 Post subject: |
|
|
Once I added the "satisfy any" in the <Directory> it worked:
<Directory /var/www/example2/public>
Satisfy any
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory> |
|
Back to top |
|
|
|
|
|
|