|
Home > Archive > Apache Server configuration support > November 2006 > virtual host takes over, default server is being ignored
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
virtual host takes over, default server is being ignored
|
|
| iixqzitexw@mailinator.com 2006-11-29, 1:33 am |
| Hello,
I have the following problem with Apache version 2.0.53, running on
SuSE Linux 9.3:
- one default server
- one virtual host listening to www1.mydomain.com (see my httpd.conf
snip below)
Nevertheless, ALL requests to the server are being answered by the
virtual host.
No matter how I access the server, it loads the /public_html instead of
the /loadbalance directory.
It's just like the virtual hosts becomes the default server.
What am I doing wrong?
Regards,
-Henric
===
DocumentRoot /home/myuser/loadbalance
<Directory "/home/myuser/loadbalance/">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
DocumentRoot "/home/myuser/public_html"
ServerName www1.mywebsite.com
<Directory "/home/myuser/public_html">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
| |
| shimmyshack 2006-11-29, 1:33 am |
| stick the default server inside virtualhost block as well, the rule is
that the first vhost is always the winner if nothing else can be found
to satisy the request.
you can also have another server outside the vhosts which will act as
default - when you turn off virtual hosting.
| |
|
| iixqzitexw@mailinator.com wrote in news:1164764860.399305.278750@
14g2000cws.googlegroups.com:
> Hello,
>
> I have the following problem with Apache version 2.0.53, running on
> SuSE Linux 9.3:
> - one default server
> - one virtual host listening to www1.mydomain.com (see my httpd.conf
> snip below)
>
>
> Nevertheless, ALL requests to the server are being answered by the
> virtual host.
> No matter how I access the server, it loads the /public_html instead of
>
> the /loadbalance directory.
> It's just like the virtual hosts becomes the default server.
>
>
> What am I doing wrong?
>
>
> Regards,
> -Henric
>
>
> ===
> DocumentRoot /home/myuser/loadbalance
> <Directory "/home/myuser/loadbalance/">
> Options FollowSymLinks
> AllowOverride All
> Order allow,deny
> Allow from all
> </Directory>
>
>
> <VirtualHost *:80>
> DocumentRoot "/home/myuser/public_html"
> ServerName www1.mywebsite.com
> <Directory "/home/myuser/public_html">
> allow from all
> Options +Indexes
> </Directory>
> </VirtualHost>
>
>
The only thing you did wrong was not thoroughly read the manual. By using
<VirtualHost *:...> you have effectively created a default server. The
main server will now be ignored.
Move your main server config to your Vhosts section and restart. I think
you will get the results you want.
----== Posted via webservertalk.com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.webservertalk.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
|
|
|
|
|