foldername showing when coming from subdomain

Webmin
2012-10-13
2013-05-22
  • Tommy Maersk
    Tommy Maersk
    2012-10-13

    I got my apache server running on ubuntu, just installed webmin and usermin, created a virtual host, got it to work, but whenever i come from www.domain.com it redirects to domain.com/foldername foldername being the name of the folder where the files for that domain are placed - but when i enter domain.com in browser it just goes to domain.com no folder  name, why is that?

    Thanks

     
  • don rowe
    don rowe
    2012-10-13

    Try adding

    ServerAlias www.domain.com

    to your virtual host declarations in httpd.conf

     
  • Tommy Maersk
    Tommy Maersk
    2012-10-15

    Hey again.
    My httpd.conf is empty, however ServerAlias www.domain.com is already in place in the file in the sites-available folder

     
  • don rowe
    don rowe
    2012-10-15

    Apache comes with a non-empty default httpd.conf.  Find it or create it,then check the DocumentRoot declarations for domain.com and www.domain.com.

     
  • Tommy Maersk
    Tommy Maersk
    2012-10-15

    On mine its empty, placed in the folder /etc/apache2, but in the etc/apache2/sites-available there is the files with the declarations, and ServerAlias is there with www.domain.com

     
  • Tommy Maersk
    Tommy Maersk
    2012-10-15

    Hmm suddenly i just startet working… weird… thanks for your time