Hello:
We are running
Server version: Apache/2.2.10 (Linux/SUSE)
Server built: May 5 2010 14:32:30
on Suse 11.
I am trying to configure two virtual hosts on a machine for testing: hdesk.mydomain.com and hdwiki.mydomain.com. These two names are NOT in DNS, but I plan to test using the server's IP address instead of a hostname anyway.
I've tried several different things, with the end result consistently being that I can get to EITHER hdesk OR hdwiki but not both.
The important part of hdesk.conf looks like this:
<VirtualHost *:80>
ServerAdmin me@localhost
ServerName hdesk.mydomain.com
DocumentRoot /srv/www/htdocs/blogs
and the important part of hdwiki.conf looks like this:
<VirtualHost *:80>
ServerAdmin me@localhost
ServerName hdwiki.mydomain.com
DocumentRoot /srv/
Important lines in listen.conf are
Listen 80
and
NameVirtualHost *:80
When I run apache2ctl configtest, I get Syntax OK.
When I browse to IP address>/hdesk I get the blog that's there.
When I browse to IP address/hdwiki, I get Object not found.
If I change the line in listen.conf from
NameVirtualHost *:80
to
NameVirtualHost <server's IP address>:80
and run apache2ctl configtest, the error I get is:
[Wed Feb 23 14:00:15 2011] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Wed Feb 23 14:00:15 2011] [warn] NameVirtualHost <server's IP address>:80 has no VirtualHosts
What am I missing?
Thanks in advance for any help!
veg
We are running
Server version: Apache/2.2.10 (Linux/SUSE)
Server built: May 5 2010 14:32:30
on Suse 11.
I am trying to configure two virtual hosts on a machine for testing: hdesk.mydomain.com and hdwiki.mydomain.com. These two names are NOT in DNS, but I plan to test using the server's IP address instead of a hostname anyway.
I've tried several different things, with the end result consistently being that I can get to EITHER hdesk OR hdwiki but not both.
The important part of hdesk.conf looks like this:
<VirtualHost *:80>
ServerAdmin me@localhost
ServerName hdesk.mydomain.com
DocumentRoot /srv/www/htdocs/blogs
and the important part of hdwiki.conf looks like this:
<VirtualHost *:80>
ServerAdmin me@localhost
ServerName hdwiki.mydomain.com
DocumentRoot /srv/
Important lines in listen.conf are
Listen 80
and
NameVirtualHost *:80
When I run apache2ctl configtest, I get Syntax OK.
When I browse to IP address>/hdesk I get the blog that's there.
When I browse to IP address/hdwiki, I get Object not found.
If I change the line in listen.conf from
NameVirtualHost *:80
to
NameVirtualHost <server's IP address>:80
and run apache2ctl configtest, the error I get is:
[Wed Feb 23 14:00:15 2011] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Wed Feb 23 14:00:15 2011] [warn] NameVirtualHost <server's IP address>:80 has no VirtualHosts
What am I missing?
Thanks in advance for any help!
veg