u
This commit is contained in:
@@ -2,27 +2,26 @@
|
|||||||
# configuration of hw.op.fo / frode klevstul
|
# configuration of hw.op.fo / frode klevstul
|
||||||
# - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
# enforce ssl and bare domain (without www) for http requests
|
# http to https
|
||||||
# ($server_name will return the first value given)
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name op.fo hw.op.fo;
|
|
||||||
return 301 https://$server_name$request_uri;
|
|
||||||
}
|
|
||||||
|
|
||||||
# www to bare domain for https requests
|
|
||||||
server {
|
|
||||||
listen 443 ssl http2;
|
|
||||||
listen [::]:443 ssl http2;
|
|
||||||
|
|
||||||
ssl_certificate /etc/nginx/acme.sh/op.fo/fullchain.pem;
|
|
||||||
ssl_certificate_key /etc/nginx/acme.sh/op.fo/key.pem;
|
|
||||||
ssl_trusted_certificate /etc/nginx/acme.sh/op.fo/cert.pem;
|
|
||||||
|
|
||||||
server_name hw.op.fo;
|
server_name hw.op.fo;
|
||||||
return 301 $scheme://op.fo$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# hw to bare domain for https requests
|
||||||
|
#server {
|
||||||
|
# listen 443 ssl http2;
|
||||||
|
# listen [::]:443 ssl http2;
|
||||||
|
#
|
||||||
|
# ssl_certificate /etc/nginx/acme.sh/op.fo/fullchain.pem;
|
||||||
|
# ssl_certificate_key /etc/nginx/acme.sh/op.fo/key.pem;
|
||||||
|
# ssl_trusted_certificate /etc/nginx/acme.sh/op.fo/cert.pem;
|
||||||
|
#
|
||||||
|
# server_name hw.op.fo;
|
||||||
|
# return 301 $scheme://op.fo$request_uri;
|
||||||
|
#}
|
||||||
|
|
||||||
# hw.op.fo
|
# hw.op.fo
|
||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
|
|||||||
Reference in New Issue
Block a user