29 lines
566 B
Plaintext
29 lines
566 B
Plaintext
#######
|
|
### 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;
|
|
}
|
|
}
|