added server_names template file and updated redirectHTTPS to use it

This commit is contained in:
Asif Bacchus 2019-01-04 02:50:07 -07:00
parent 794642eef0
commit 88663dd4bb
2 changed files with 8 additions and 3 deletions

View File

@ -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;

View File

@ -0,0 +1,6 @@
#######
### NGINX configuration -- list of server names
#######
server_name
;