[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [users@httpd] virtual host

Quoting Carmel NY (carmel_ny@xxxxxxxxxxx):

> >Please elaborate on the 'not working out so well' bit.

> >> apachectl -S
> >> VirtualHost configuration:
> >> *:80          (/usr/local/etc/apache24/extra/httpd-vhosts.conf:24)
> >> *:443         (/usr/local/etc/apache24/extra/httpd-ssl.conf:121)  

> Okay, on a stock FreeBSD installation, maybe on others too, there is an
> index.html file in the document root that displays, "It Works" when it is
> access. Now, when I type in my normal web address;, the
> vhost site is displayed. However, if I type in the vhost name;
>, the regular site is display; ie. "It Works". That
> is exactly opposite of what it is supposed to be doing. That make no sense,
> so I know that I am doing something really wrong.

This is Apache 2.4.x ?

I don't see the 'default server ...',' is a NameVirtualHost'
and 'alias'-lines in your 'apache2ctl -S' output.

Did you remove those yourself?  It always helps not to obfuscate your configs
and logs when seeking help.

# apache2ctl -S
VirtualHost configuration:    is a NameVirtualHost
   default server (/etc/apache2/sites-enabled/
   port 443 namevhost (/etc/apache2/sites-enabled/
 [ .. ]
[2001:7b8:633:1:213:154:236:176]:443 is a NameVirtualHost
   default server (/etc/apache2/sites-enabled/
   port 443 namevhost (/etc/apache2/sites-enabled/

Apache will, by default, treat the first vhost definition it finds as
the default vhost for that IP/port combo. Try defining a simple vhost
before defining the vhost so that no longer is your
default vhost.

| Scenery is here, wish you were beautiful.
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7  FBD6 F3A9 9442 20CC 6CD2

To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx