: How should I set the default virtualhost? I want to run 2 websites. One for www.example.com, and the other for everything else (www.example2.com, www.example3.com) How I do it? I tried: <virtualhost
I want to run 2 websites.
One for example.com, and the other for everything else (www.example2.com, example3.com)
How I do it?
I tried:
<virtualhost *:80>
ServerName example.com </virtualhost>
<virtualhost> #no server name
</virtualhost>
But I ALWAYS get the second website.
Thank you.
More posts by @Margaret670
1 Comments
Sorted by latest first Latest Oldest Best
The default host that is the one that is first
# Default host (must be first)
<virtualhost *:80>
# I use localhost.localdomain, but any host name not matching later hosts gets handled here
Servername localhost.localdomain
DocumentRoot /home/www/default_site
...
</virtualhost>
<virtualhost *:80>
ServerName example.com </virtualhost>
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.