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;
server_name server.domain.tld
subdomain.server.domain.tld
subdomain2.server.domain.tld;
# specify server name(s)
include /etc/nginx/snippets/server_names.conf;
# redirect to properly formed HTTPS request
return 301 https://$host$request_uri;

View File

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