HomeAboutMailing ListList Chatter /0/0

Apache sub domains question

2018-05-23 by: Michael Scholten
From: Michael Scholten 
I have two domains pointed to the same Ubuntu/Apache server. I then have a
couple sub domains in there as well.

I'm also using Lets Encrypt (certbot) to handle my SSL certs which I have
to say is super easy! If you haven't tried using Lets Encrypt I highly
recommend giving it a go!

When I hit any of the (sub)domains I get the page I expect. When I try
using HTTPS I get the correct page on each of the domains and sub domains
except for one.

So for instance, if I go to https://tnscholten.org I get
https://tnscholten.org and likewise for https://tnscholten.com and

The one that gives me trouble is https://start.tnscholten.org. If I go to
the http version it works just fine but if I go to https it takes me to
tnscholten.com. Just as a note, tnscholten.com was a Drupal site but I
ended up scrapping it but I think it may be part of my initial issues. Not

The directory layout is all under /var/www:
html (which is actually tnscholten.org)

My question is, what have I done wrong that one subdomain goes to an
entirely different folder and domain name?

=============================================================== From: wes ------------------------------------------------------ How did you go about configuring Apache to serve each of these addresses? Did you use some sort of automatic configuration tool? Or did you edit the conf files directly? Either way, it may be very helpful to see the actual web server configuration. -wes On Tue, May 22, 2018 at 6:18 PM, Michael Scholten wrote:

=============================================================== From: David Rucker ------------------------------------------------------ Hello, I ran into this a while back. My issue was when I created the new subdomain I was trying to manually add the secure one as well. So the fix was to just add the base sever and then rerun Let's Encrypt add-ons, which at the moment I can't think of the name of. After that all worked. Let's Encrypt when ran should point both HTTP and HTTPS to the HTTPS server so that however you go to the sure it will always be secure. Thanks, David

=============================================================== From: Dean Warren ------------------------------------------------------ Hey David, Clarification question... So you added you new subdomain then just reran the let'encrypt script including all you sub's? Or just ran it on the main domain? On Wed, May 23, 2018, 5:22 AM David Rucker wrote:

=============================================================== From: David Rucker ------------------------------------------------------ Reran it and when prompted just selected the subdomain. Each subdomain is pretty much treated as if it's a completely different domain. To both lets encrypt and apache. I tried several times to do it manually and was never successful. David R.

=============================================================== From: Michael Scholten ------------------------------------------------------ I ran letencrypt's certbot each time I created a new subdomain. To be exact I ran: certbot --expand -d tnscholten.org,michael.tnscholten.org ,tnscholten.com,start.tnscholten.org I would just tack on a comma and then the next (sub)domain. As for the conf page, I suspect it's too long to post raw via email. How would you recommend I post it? Not trying to bring unwanted attention to my web server... On Wed, May 23, 2018 at 1:22 PM David Rucker wrote:

=============================================================== From: Michael Scholten ------------------------------------------------------ Here is my conf file: https://github.com/palanthas/apache/blob/master/apache.conf On Wed, May 23, 2018 at 8:39 PM Michael Scholten wrote: