My domain is: bournemouthbeaches.co.uk (secured with lets encrypt ssl cert)
I ran this command: http://anotherwebsite.co.uk (http only - accessed via my /etc/hosts file hosted on same apache server)
It produced this output: displayed front page of https://bournemouthbeaches.co.uk
My web server is (include version): Apache/2.4.52 (Ubuntu)
The operating system my web server runs on is (include version): Ubuntu 22.04 LTS
My hosting provider, if applicable, is: me
I can login to a root shell on my machine (yes or no, or I don't know): yes (via sudo)
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 2.9.0
Hi,
I set up a domain (bournemouthbeaches.co.uk) on my apache server and successfully gained an SSL certificate no problems.
I created a second test site (call it testsite.co.uk). I access this site by listing it in my /etc/hosts file so I don't have to mess with the DNS. This site has no certificate and is intended to be accessed by http port 80. The /etc/host file correctly intercepts the testsite.co.uk address and associates it with the IP address.
<I think - pretty sure> I have the apache conf files set up correctly for both sites (famous last words) on the server. But when I try and access the http://testsite.co.uk it defaults to https://bournemoutbeaches.co.uk. AS I've disabled the apache default site it strongly indicates either I have cocked up or there is something forcing apache to use 443 and avoid 80 for all sites hosted.
If I disable both (80 & 443) bournemouthbeaches.co.uk apache conf files I still get SSL errors and the browser still tries to access https (I do have the browser configured to allow access to http and that works on other http sites) i.e. defaults to https://testsite.co.uk. Which of course doesn't exist
Neither can i access http://bournemouthbeaches.co.uk when I disable only the secure conf file in apache and comment out the redirection at the bottom of the http conf file.
I'm at a loss! A few questions for any one who knows..
- Can I actually run http (port 80) and https (443) on the same server? Or is this not viable?
- Is there a way of disabling the SSL verification on bournemouthbeaches.co.uk so I can get it working again as vanilla http?
- Is there a setting in apache I need to set/clear to allow mixed (http and https) traffic?
- My intention is to actually have several DNS addressed sites on this server. But obviously initially they need to be http in order to get registered on a new certificate. How can I achieve this if I cannot set them up as http site(s) first?
Any suggested debug would be great. (And apologies for the length)