Debian, Virtualmin, Apache2, Headache.

Discussion in 'Server Operation' started by propercc, May 7, 2008.

  1. propercc

    propercc New Member

    This is probably a simple fix, just can't get my head around it.

    My servers fqdn is server.mydomain.com, a recently added domain name is www.recentdomainname.com.

    I have a list of 5 virtual servers with www.recentdomainname.com as the last added server.

    The problem: Apache is forwarding all traffic to the most recently added virtual server if it doesn't have a virtual server setup for the request. This is a problem as my FQDN for the server will always resolve to the most recently added virtual server.

    So bascially I point my browser to server.mydomain.com and it forwards the request to www.recentdomainname.com. It's a full forward, the URL changes in the browser from server.mydomain.com to www.recentdomainname.com.

    I have adjusted the "default virtual server" for any request on 80 with * for the servername and alias, with no luck.

    I have put

    Code:
    <VirtualHost *>
    ServerName *
    DocumentRoot /var/www
    ServerAlias *
    </VirtualHost>
    
    in above the "Include /etc/apache2/sites-enabled/" in apache2.conf with no luck.

    However if I create a new domain www.anotherrecentdomainname.com, suddenly the forward goes to that when pointing the browser to server.mydomain.com.

    Whatever is the most recently created virtual server becomes the default virtual server...

    If this is not clear please let me know. Any suggestions? Thanks in advance.

    -Chris

    Now I may be nuts, so if that's the case then say so...
     
  2. propercc

    propercc New Member

    Progress

    Well, I just figured out its not displaying the most recent virtual server. It's displaying the first alphabetical virtual server. I created a virtual server called 1.mydomain.com and now it has become the default virtual server...

    Problem solved I guess, half a$$ed. Still would like to know the real solution for this problem. I suspect it has to do with Virtualmin looking to a directory for virtual servers (/etc/apache2/sites-enabled/). Maybe the file system is sorting them alphabetically so its loading them that way. Weird.
     
  3. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/apache2/apache2.conf, and what's the output of
    Code:
    ls -la /etc/apache2/sites-enabled
    ?
     

Share This Page