Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Servername directive

Status
Not open for further replies.

mufka

ISP
Dec 18, 2000
587
US
Can I use two Servername directives within a single <VirtualHost> group?

How else can I have two hostnames point to the same files without having two <VirtualHost> groups?

 
Some people have more than one domain name for the same website. They just have dns point all the domains to the same ip. If apache can't resolve these names, it defaults to the first vhost defined or the main server if no vhosts are defined. The only issue is that in the url box of the browser, it will show the name of the server it defaulted to. If you want to display the typed in url the user's browser, you can define virtual hosts and share the same DocumentRoot. In other words, you would just have to have a ServerName and DocumentRoot and maybe UseCanonicalName Off in each vhost container. One more option is to Forward thes other domains to your main domain via dns.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top