I have found a problem.
/etc/apache2/site-enabled/ contain the site list enabled in the server.
This directory is included into main apache config to read virtualhost information.
The problem is simple.
The directory is readed in alphabetic order , so the site are inculde in this order :
So, calling the server by ip address create this problem, i can see only forum.example.com
I am trying to insert one redirect into default ( / into /home/myexample/public_html/ ) and it work, but i want a real redirect not just a fake one, becouse log file are in separate file.
Any idea ?
Hmm, so what sort of redirect are you looking for specifically?
There’s a few different ways to do redirects. It also might also be worth trying to get your desired domain to be the default host rather than doing a redirect – though in the little bit of tinkering I’ve done, I’m not sure Virtualmin would be thrilled about you changing the filenames within sites-enabled.
-Eric
Well, I just saw Jamie post a response to a request in the tracker addressing an issue very similar to this. He said:
"One trick you can use to force an ordering /etc/apache2/sites-enabled is to rename the files so that the one you want processed first is first in alphabetical order. So you could rename x.mydomain.net.conf to 00-x.mydomain.net.conf."
So according to him, you could simply rename the domain you wish to be the default such that it’s ordered first, alphabetically.
At that point, you wouldn’t have to worry about redirecting.
-Eric