added server_names template file and updated redirectHTTPS to use it
This commit is contained in:
parent
794642eef0
commit
88663dd4bb
@ -7,9 +7,8 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
|
||||||
server_name server.domain.tld
|
# specify server name(s)
|
||||||
subdomain.server.domain.tld
|
include /etc/nginx/snippets/server_names.conf;
|
||||||
subdomain2.server.domain.tld;
|
|
||||||
|
|
||||||
# redirect to properly formed HTTPS request
|
# redirect to properly formed HTTPS request
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
|
6
snippets/server_names.conf
Normal file
6
snippets/server_names.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#######
|
||||||
|
### NGINX configuration -- list of server names
|
||||||
|
#######
|
||||||
|
|
||||||
|
server_name
|
||||||
|
;
|
Loading…
Reference in New Issue
Block a user