updated directory structure to match actual install
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#######
|
||||
### NGINX server configuration
|
||||
### Drop all connections that do not match configured servers
|
||||
#######
|
||||
|
||||
# Drop connections over HTTP by default
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
# have nginx silently drop the connection
|
||||
return 444;
|
||||
}
|
||||
|
||||
# Drop connections over HTTPS by default
|
||||
# This could only happen after user proceeds past certificate mismatch warning
|
||||
# or if using a wildcard certificate where obviously not all possible hosts
|
||||
# could be configured.
|
||||
# Respond with default certificates then drop connection
|
||||
server {
|
||||
listen 443 default_server ssl http2;
|
||||
listen [::]:443 default_server ssl http2;
|
||||
|
||||
# SSL certificates for this server
|
||||
include /etc/nginx/snippets/ssl/ssl_certs.conf;
|
||||
|
||||
# have nginx silently drop the connection
|
||||
return 444;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
#######
|
||||
### NGINX server configuration
|
||||
### Redirect to secure connection
|
||||
#######
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
# specify server name(s)
|
||||
include /etc/nginx/snippets/server_names.conf;
|
||||
|
||||
# redirect to properly formed HTTPS request
|
||||
return 301 https://$host$request_uri;
|
||||
|
||||
# error pages
|
||||
error_page 404 /404.html;
|
||||
location = /404.html {
|
||||
root /usr/share/nginx/html;
|
||||
internal;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
internal;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
#######
|
||||
### NGINX server configuration
|
||||
### Redirect to secure connection
|
||||
### Process LetsEncrypt verification requests
|
||||
#######
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
# specify server name(s)
|
||||
include /etc/nginx/snippets/server_names.conf;
|
||||
|
||||
# redirect to properly formed HTTPS request
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
# process LetsEncrypt requests
|
||||
location ^~ /.well-known/acme-challenge {
|
||||
# log requests to review issued certs or for security auditing
|
||||
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;
|
||||
}
|
||||
|
||||
# error pages
|
||||
error_page 404 /404.html;
|
||||
location = /404.html {
|
||||
root /usr/share/nginx/html;
|
||||
internal;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
internal;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user