Szerver HTTP HTTPS

Fórumok

Házi szerverem Debian, Apache. 80, 443  port nyitva. https://www.esp8266.org ,Let's Encrypt van rajta. Azt szeretném, hogy a http://www.esp8266.org/idip könyvtár mezei http formában a 80-as porton legyen elérhető. Nem vagyok profi, ezért kérdezek. Köszönöm.

Hozzászólások

<Directory "/var/www/html">
    AllowOverride All
</Directory>

<VirtualHost *:80>

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{SERVER_NAME} =www.esp8266.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

</VirtualHost>

<VirtualHost *:443>
    SSLEngine on
    ServerName www.esp8266.org
    SSLCertificateFile /etc/letsencrypt/live/www.esp8266.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.esp8266.org/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>


# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

000-default.conf

Ezt gondolom a Let's encrypt generálta. Megsúgod, hogy hogy módosítsam?

De. Át is írtam, de ehun sámli.

<Directory "/var/www/html">
    AllowOverride All
</Directory>

<VirtualHost *:80>
    RewriteEngine On
    RewriteCond %{HTTPS} off
   RewriteCond %{REQUEST_URI} !^/idip(/|$) [NC]
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{SERVER_NAME} =www.esp8266.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

</VirtualHost>

<VirtualHost *:443>
    SSLEngine on
    ServerName www.esp8266.org
    SSLCertificateFile /etc/letsencrypt/live/www.esp8266.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.esp8266.org/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>


# vim: syntax=apache ts=4 sw=4 sts=4 sr noet