ab-nginx/build/sites/05-test_secured.conf.disabled

41 lines
896 B
Plaintext
Raw Normal View History

2019-10-16 23:44:47 -06:00
### UNsecured test page
server {
2019-10-17 00:52:55 -06:00
listen 80;
2019-10-16 23:44:47 -06:00
include /etc/nginx/server_names.conf;
2019-10-17 00:52:55 -06:00
# 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;
2019-10-17 01:34:52 -06:00
root /LEChallenge;
2019-10-17 00:52:55 -06:00
autoindex on;
}
# error pages
include /etc/nginx/errorpages.conf;
}
2019-10-17 00:52:55 -06:00
server {
listen 443 ssl https2;
include /etc/nginx/server_names.conf;
# ssl certificates
include /etc/nginx/ssl_certs.conf;
2019-10-16 23:44:47 -06:00
location / {
try_files $uri $uri/ =404;
}
# error pages
include /etc/nginx/errorpages.conf;
2019-10-16 23:44:47 -06:00
}