Re: apache2 Virtual Host configuration



Sean Kim <muzehyun@xxxxxxxxx> wrote:
I got warning message "www.domain.com:80 has no VirtualHosts"

This means that you have defined NameVirtualHost www.domain.com:80
without a VirtualHost definition.

My machine has one IP address and I want to use several subdomains.

Is there a reason, why you should only listen on that IP? If you listen
on all IPs and you got only one IP you're listening on taht IP.

Like that:

# 1 NameVirtualHost Statement for all VirtualHosts
NameVirtualHost *:80

# The ServerName Switch is used to direct Apache to the right Website.

<VirtualHost *:80>
ServerName localhost
ServerAdmin webmaster@localhost
...
</VirtualHost>

<VirtualHost *:80>
ServerName svn.domain.com
...
</VirtualHost>

<VirtualHost *:80>
ServerName www.domain.com
...
</VirtualHost>


Cheers, Isaac
.



Relevant Pages

  • IP Virtual Hosting and SSL
    ... sites, a production and a dev site, on one apache instance. ... NameVirtualHost 1.1.1.1:80 ... ServerName www.mysite.com ... no listening sockets available, shutting down ...
    (comp.lang.javascript)
  • how to run httpd on all the Alias IPs ???
    ... Please suggest me how to run httpd on Alias IPs. ... I am running apache 2.0.40 on RHEL 3.0 for practice ... hosting....httpd service is listening only for ... ServerName 192.168.2.49 ...
    (RedHat)
  • Re: how to run httpd on all the Alias IPs ???
    ... > Please suggest me how to run httpd on Alias IPs. ... > hosting....httpd service is listening only for ... > ServerName www.opeshalkara.com ...
    (RedHat)
  • Re: Virtual hosts in Apache (URGENT)
    ... You can't use "<Virtualhost *>". ... On Sun, 21 Sep 2003, Lorenzo Prince wrote: ... > ServerName prince.homelinux.org ... > NameVirtualHost address is not supported, ...
    (RedHat)
  • Re: Virtual Hosts
    ... NameVirtualHost 192.168.10.1 ... Options FollowSymLinks ... DirectoryIndex index.php ... ServerName www.al.org ...
    (Ubuntu)