Answer the question
In order to leave comments, you need to log in
Why does it automatically switch from http to https?
Initially, apache was configured on the VPS, after an unsuccessful attempt to install a mail server, or rather a boxed Mail-in-a-Box solution that screwed everything up on the server, removed apache, installed nginx. It’s possible to restore everything back to apache manually, but for some reason, when switching to a domain, it automatically switches to the https version, although this is not written in the apache redirect.
The standard apache page (with a message that everything is working) shows normally by IP, but when you go to the site it switches to https and of course the page is not found
Answer the question
In order to leave comments, you need to log in
There is another option in which the browser automatically "redirects" from http to https
More details here: habrahabr.ru/post/216751
The setting is called "HTTP Strict-Transport-Security" and in the config it looks something like this:
If you want the setting to be used in the same way for subdomains (subdomains such as xxx.example.com, xxx2.example.com, etc.), the includeSubDomains parameter is specified
max-age means the number of seconds during which the browser remembers that the domain has https and should be forced to use it. max-age=31536000 = 1 year.
The problem was just in the browser! This, as it turned out, cached!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question