You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Bill Measday <li...@measday.com> on 2005/10/20 03:03:13 UTC

[users@httpd] Virual hosts not working

Under Fedora Core 4 and Apache 2.0, I have the following in
/etc/httpd/conf/httpd.conf

...
Listen *:80

...

NameVirtualHost *:80

# Where do we put the lock and pif files?
LockFile "/var/lock/httpd.lock"
CoreDumpDirectory "/etc/httpd"

# Defaults for virtual hosts

# Logs

#
# Virtual hosts
#

# Virtual host Default Virtual Host
<VirtualHost *>

 	ServerSignature email

	DirectoryIndex  index.php index.html index.htm index.shtml

 	LogLevel  warn
 	HostNameLookups off

</VirtualHost>

# Virtual host www.example-hyphenated.com

<VirtualHost *:80>
        ServerName www.example-hyphenated.com

 	DocumentRoot /www/html/e-h

 	ServerAdmin webmaster
        ServerAlias example-hyphenated.com

	DirectoryIndex index.html index.htm index.shtml

</VirtualHost>

...

web docs are stored in /var/www/html for non-virual host (I tried
DocumentRoot /var/www/html as well but this didn't work either)

Instead of seing the tesp page I have stored in /var/www/html/e-h/index.htm,
I still see the main web pages from /var/www/html (ie the non-virtual host
site).

My conf file seems to be in line with the example doc.s so I assume I'm
doing something pretty dumb, or missing some basic setup parameter.

I've tried both reloading and restarting after changing the conf.

Thanks in advance


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Virtual hosts not working

Posted by Bill Measday <li...@measday.com>.
It turns out that since I'm sitting behind a router that does NAT, that I
need to explicitly list the interface IP address(es)

Once this was done, all works perfectly


-----Original Message-----
From: Bill Measday [mailto:linux_test@measday.com] 
Sent: Thursday, 20 October 2005 11:03 AM
To: users@httpd.apache.org
Subject: [users@httpd] Virual hosts not working

Under Fedora Core 4 and Apache 2.0, I have the following in
/etc/httpd/conf/httpd.conf

...
Listen *:80

...

NameVirtualHost *:80

# Where do we put the lock and pif files?
LockFile "/var/lock/httpd.lock"
CoreDumpDirectory "/etc/httpd"

# Defaults for virtual hosts

# Logs

#
# Virtual hosts
#

# Virtual host Default Virtual Host
<VirtualHost *>

 	ServerSignature email

	DirectoryIndex  index.php index.html index.htm index.shtml

 	LogLevel  warn
 	HostNameLookups off

</VirtualHost>

# Virtual host www.example-hyphenated.com

<VirtualHost *:80>
        ServerName www.example-hyphenated.com

 	DocumentRoot /www/html/e-h

 	ServerAdmin webmaster
        ServerAlias example-hyphenated.com

	DirectoryIndex index.html index.htm index.shtml

</VirtualHost>

...

web docs are stored in /var/www/html for non-virual host (I tried
DocumentRoot /var/www/html as well but this didn't work either)

Instead of seing the tesp page I have stored in /var/www/html/e-h/index.htm,
I still see the main web pages from /var/www/html (ie the non-virtual host
site).

My conf file seems to be in line with the example doc.s so I assume I'm
doing something pretty dumb, or missing some basic setup parameter.

I've tried both reloading and restarting after changing the conf.

Thanks in advance


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org