funeralcrasher: (Default)
How does Apache determine which of your existing vhosts is the default?

Meaning:

  • I have two vhost.conf files in /etc/apache2/vhosts/ - fu.vhosts.conf and bar.vhosts.conf. 
  • Both of these were copied from vhosts.template
  • I performed a find and replace on "dummy-host.example.com" to "fu", and "bar", respectively. 
  • I copied web content into /srv/www/vhosts/fu and /srv/www/vhosts/bar
  • No content exists under /srv/www/htdocs


When I type in the IP of the server, the "fu" site appears.  How do I set a another site to appear as the default?

Thanks!

Date: 2006-05-29 11:49 am (UTC)From: [identity profile] darkvervain.livejournal.com
Default vhosts (the one where it pops up if you have an IP) is (for me):

NameVirtualHost *:80
<IfDefine DEFAULT_VHOST>
<VirtualHost *:80>
DocumentRoot "/var/www/localhost/htdocs"

...

Do you have a DEFAULT_VHOST directive in your apache config?

Date: 2006-05-29 11:52 am (UTC)From: [identity profile] darkvervain.livejournal.com
Now that I think about it, I believe the default vhost (the one it goes to if a different fully qualified domain name doesn't match it) should be listed first and not have a "Servername" directive in it.

Profile

funeralcrasher: (Default)
funeralcrasher

June 2020

S M T W T F S
 123456
78910111213
141516 1718 1920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 26th, 2025 04:08 pm
Powered by Dreamwidth Studios