I've screwed up Apache configs, but I don't know what I did. hxxps://domain2 is ok, hxxp://domain2 goes to hxxps://domain1

Ubuntu 20.04.1, latest Apache and everything including VirtualMin

So, I’ve done something not quite right, and I’m not certain where to look.

Primary issue:
I have three domains on this box so far, domain0, domain1, and domain2.

hxxps://domain0 works fine.
hxxp://domain0 redirects to hxxps://domain0, works fine.

hxxps://domain1 works fine.
hxxp://domain1 redirects to hxxps://domain1, works fine.

hxxps://domain2 works fine.
hxxp://domain2 sends a 302 and redirects to hxxps://domain1 which is bad.

Secondary issue which is probably related:
hxxps://ip-address-of-server works fine.
hxxp://ip-address-of-server sends a 302 and redirects to hxxps://domain1 which is bad.

What the heck did I do, what config files should I look at to fix this?

First place to look is .htaccess in web root of domain2.

Second place to look is in /etc/httpd/conf/httpd.conf, also available in Webmin > Servers > Apache Webserver > Global Configuration > Edit Config Files.



If you’d like, we can setup a session to look into what may be causing the problems you are having. If interested, drop me an email.

Best Regards,
Peter Knowles | TPN Solutions

That would be great. I’ve gone through what I feel is every single config file I and DO NOT see what’s going wrong here. I even blew away the newest domain and recreated it to see if that helped, no change. I’ll email you.

Almost nothing is in the main apache conf, it’s all in individual site confs, and I’ve cone through those. There’s no .htaccess files /at all/ in any of the sites (I know dot files are hidden, I checked) and even blew away the newest domain and recreated it.

Peter was VERY helpful. I knew it was going to be something small and subtle I was just overlooking and his expertise helped tremendously. VirtualMin wasn’t setting the IP to listen on in the config. Once we set that manually in the conf file things Just Worked! Thanks Peter!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.