nginx_config/sites-available/http_2_https

15 lines
295 B
Plaintext

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name _ ;
include /etc/nginx/snippets/letsencrypt.conf;
root /var/www/html;
index index.html;
location / {
rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https
}
}