B
B
Baltimora2018-01-28 19:19:13
Apache HTTP Server
Baltimora, 2018-01-28 19:19:13

Do I need to leave the config with SSL only?

I manually installed LAMP. Then I connected an SSL certificate from Lets Encrypt and I have a question.
My main site config ivan-glazkov-ru.conf
But since I connected https, the corresponding config was created, more specifically ivan-glazkov-ru-le-ssl.conf
Should they both be executed? Or because I now have https, then the standard config ivan-glazkov-ru.conf needs to be turned off?
5a6df7733238d581255218.png
+ here are the screenshots of the configs themselves,
this is ivan-glazkov-ru.conf
5a6df8b22d0f1868893000.png
and this is ivan-glazkov-ru-le-ssl.conf
5a6df86b18c83476685401.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Puma Thailand, 2018-01-29
@opium

If you remove the first site, the site will not open via http

V
Viktor Taran, 2018-01-29
@shambler81

In my opinion, this is obvious, there are a lot of instructions on the Internet for switching from http to https
, in none of them you will find deleting the config.
If the site has already switched to https and the weight has been transferred, then the old http must be re-pasted with a redirect to https

############################################################################
#### Перенаправляем протокол http на https                              ####
############################################################################
RewriteCond %{ENV:HTTPS} !on
   # Проверяем наличие https в URL.
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
   # Перенаправляем протокол на http.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question