Auto-Subdomain (WWW) goes to default site.

Discussion in 'Installation/Configuration' started by wallycleaver, Jul 9, 2018.

  1. wallycleaver

    wallycleaver New Member


    I have a site setup using auto-subdomain for www.
    The site runs Apache.
    When I access the site using the format, I have no issues, however, when I use the format, I am redirected to the systems base website and receive the Apache test page.
    Additionally, I am using SSL with Letencrypt. At first I thought this may have been the issue however it does not appear so to me. I mention it here because when i connect using https on, I notice that the certificate is the systems self signed certificate, not the letsencrypt certificate.

    I haven't seen any errors, so I am thinking I have a misconfiguration but I have not been able to locate.

    I have run htf-common-issues.php script and i do have a [WARN] could not determine server's ip address by ifconfig, but again, do not see how that could relate.

    One last item to note is that I do have an 'A' record in DNS for the www hostname I notice that in several threads people reference it should be a CNAME, but it doesn't seem to matter for my setup.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if the www subdomain is not present in that vhost. try to set auto subdomain to none, press save, set it to www again and press save. Then wait until the changes are written to disk and test again. When the issue persists, then check if there is a vhost file with .err file ending in the apache sites-available folder for this site.
  3. wallycleaver

    wallycleaver New Member

    Thanks for the reply.
    I had tried that before, also tried setting it to *, however, I went ahead and tried it again to be sure i hadn't missed something.

    The result is the same....the www site alias is pointing to the system root.

    I ran apachectl -S and noticed something interesting....

    *:443 is a NameVirtualHost
    default server (/etc/httpd/conf.d/ssl.conf:56)
    port 443 namevhost (/etc/httpd/conf.d/ssl.conf:56)

    I noticed in the above that this is pointing to the system root, where all of my other sites point to the conf/sites-enabled folder.

    At the bottom of the list from the apachectl output is a list for my listed site as well.

    port 443 namevhost (/etc/httpd/conf/sites-enabled/

    So, I am thinking that the default site is the problem.

    Thanks for any help you can give, I will also keep trying and if I locate the problem I will post it here.

  4. wallycleaver

    wallycleaver New Member

    I located the issue.
    I had set the default server name in the httpd.conf file to my external name with the www.
    I guess this causes the default, system, site to take that name.

    The really odd part to me, is this is port 80, I did not have a server name entry for port 443...just odd.

    Thanks for the help.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The global server name in httpd.conf should be the hostname of the server and the hostname of the server is something like server1.yourdomain.tld, the hostname is never the exact domain name or subdomain that you plan to use for a website or email. Change the server hostname to e.g. server1.yourdomain.tld so it does not conflict with your website, that's the reason why we tell the users in all install guides to set the server name to and not
  6. wallycleaver

    wallycleaver New Member

    Agreed, and I had done that initially, but apparently i changed it...most likely at 3am :(.
    Thanks again.

Share This Page