move SSL redirect into test file
This commit is contained in:
parent
19a6f82b54
commit
d3a349c167
@ -1,22 +0,0 @@
|
||||
### redirect to secure site
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name default_server;
|
||||
|
||||
# redirect to properly formed HTTPS location
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
# process Let's Encrypt challenges
|
||||
location ^~ /.well-known/acme-challenge {
|
||||
# log requests for security reasons
|
||||
access_log /var/log/nginx/LetsEncrypt_access.log main;
|
||||
error_log /var/log/nginx/LetsEncrypt_error.log warn;
|
||||
|
||||
default_type text/plain;
|
||||
root /usr/share/nginx/html/letsencrypt;
|
||||
autoindex on;
|
||||
}
|
||||
}
|
@ -1,9 +1,32 @@
|
||||
### UNsecured test page
|
||||
|
||||
server {
|
||||
listen 443;
|
||||
listen 80;
|
||||
include /etc/nginx/server_names.conf;
|
||||
|
||||
# default redirect to properly formed HTTPS location
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
# process Let's Encrypt challenges
|
||||
location ^~ /.well-known/acme-challenge {
|
||||
# log requests for security reasons
|
||||
access_log /var/log/nginx/LetsEncrypt_access.log main;
|
||||
error_log /var/log/nginx/LetsEncrypt_error.log warn;
|
||||
|
||||
default_type text/plain;
|
||||
root /usr/share/nginx/html/letsencrypt;
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl https2;
|
||||
include /etc/nginx/server_names.conf;
|
||||
|
||||
# ssl certificates
|
||||
include /etc/nginx/ssl_certs.conf;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user