hi,
I (still) have a website with no ssl certificate, so only http.
As most browser now automatically forward to https when typing just the url,
It is a problem.
As I host several site son the same server (same ip, port)
it automatically does to the main site. Not the site intended with the url name.
How do I fix this ?
apache forward https request to http
Re: apache forward https request to http
Simplest way edit the site conf file in
nano /etc/apache2/sites-available/000-example.com.conf
and add or update:
This will redirect and https://www.example.com to http://www.example.com
Don't forget to restart apache.
nano /etc/apache2/sites-available/000-example.com.conf
and add or update:
Code: Select all
<VirtualHost *:443>
ServerName www.example.com
redirect permanent / http://www.example.com/
</VirtualHost>
Don't forget to restart apache.
Code: Select all
etc/init.d/apache2 restart