I have a bit of a weird problem that I'd like some help tracking down. I'm pretty sure it's something with Apache. In my Apache 2.4.25 (cPanel) config file, I have the ServerAliases disabled. There's a "catch-all" entry for unbound IPs, that look like this:
<VirtualHost *>
DocumentRoot /var/www/html
<IfModule suphp_module>
suPHP_UserGroup nobody nobody
</IfModule>
</VirtualHost>
Further down, I have a VirtualHost entry for
mydomain.com, which has a DocumentRoot of /home/<myusername>/public_html
I setup a test file, /home/<myusername>/public_html/.well-known/acme-challenge/test that says www.mydomain.com-test.
Then I setup another test file, /var/www/html/.well-known/acme-challenge/test that says myhostname.mydomain.com-test
I have .htaccess files in /home/<myusername>/public_html that redirect all traffic to secure ports. I have cPanel installed and have manually setup subdomains for the various cPanel stuff.
Anyway, when I run the following command on the remote server:
curl
http://www.mydomain.com/.well-known/acme-challenge/testI see the 301 redirect. When I run:
curl
https://www.mydomain.com/.well-known/acme-challenge/testI see the:
www.mydomain.com-test
However, when I run those commands on my local Linux box instead of the remote server that's running Apache, I see:
curl
http://www.mydomain.com/.well-known/acme-challenge/test myhostname.mydomain-test
curl
https://www.mydomain.com/.well-known/acme-challenge/test www.mydomain.com-test
It's not just curl, lynx, the command line web browser, does the same thing. On the remote computer that's running Apache, for some reason, I'm seeing different results than I am when I run the commands on my local Linux box.
Any idea what's going on?
Thanks!
Sincerely,
Ken Swarthout