2 sites, www and without www, different behaviors
"
"
"
"
"mainsite.com" is also my hostname, maybe it´s something to do with that…
I´m running Ubuntu and Apache.
Thanks for any help.
4 Replies
@vonskippy:
…you want to hide YOUR PUBLIC WEBSITES.
The names seemed chosen to more clearly illustrate the problem rather than hide anything.
James
If Apache, how did you configure ServerName in the VirtualHost sections?
To treat both as distinct websites out of the same instance, set one to be the servername and then alias the other:
<virtualhost *:80="">ServerName www.mainsite.com
ServerAlias mainsite.com
...rest of the config...</virtualhost>
You may want one URL to be the official name though (e.g.
Set up the official site in one host and create another to do the redirects.
<virtualhost *:80="">ServerName http://www.mainsite.com
...rest of the config...</virtualhost>
<virtualhost *:80="">ServerName mainsite.com
Redirect permanent / http://www.mainsite.com/</virtualhost>
Duplicate these two hosts for secondary.com.
@zunzun:
The names seemed chosen to more clearly illustrate the problem rather than hide anything.
There are sooooo many things that depend on the details for everything to work - using generic names removes all of those details from the troubleshooting process.
Personally, I have better things to do then second guess whats wrong, when if all the details were given, the answer would most likely be quick to find and obvious.
Websites (unless they require some type of authenticion) are PUBLIC by nature. So hiding them from the people on this forum (a very very very very tiny fraction of the Internet in general) is not only paranoid to the extreme, but counter productive to getting their problem solved.
But feel free to waste your time ZunZun playing twenty questions - whatever floats your boat, et al.