Skip to content

Commit

Permalink
Merge pull request #1315 from jacobdgm/1289-server_names
Browse files Browse the repository at this point in the history
Specify server names in nginx configuration
  • Loading branch information
jacobdgm authored Feb 16, 2024
2 parents 8121aba + c0f9064 commit 3b650b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
11 changes: 8 additions & 3 deletions config/nginx/conf.d/cantusdb.conf.production
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
server {
# Redirect all http traffic to corresponding https page
listen 80;

server_name cantusdatabase.org www.cantusdatabase.org mass.cantusdatabase.org;

server_tokens off;

location ^~ /.well-known/acme-challenge/ {
Expand All @@ -13,10 +16,11 @@ server {
}

server {
# Redirect all https traffic for mass.cantusdatabase.org to cantusdatabase.org
# Redirect all https traffic for www.cantusdatabase.org and mass.cantusdatabase.org
# to cantusdatabase.org
listen 443 ssl;

server_name mass.cantusdatabase.org;
server_name www.cantusdatabase.org mass.cantusdatabase.org;

ssl_certificate /etc/nginx/ssl/live/certificates/cantusdatabase.org.crt;
ssl_certificate_key /etc/nginx/ssl/live/certificates/cantusdatabase.org.key;
Expand All @@ -27,8 +31,9 @@ server {
}

server {

listen 443 default_server http2 ssl;

server_name cantusdatabase.org;

ssl_certificate /etc/nginx/ssl/live/certificates/cantusdatabase.org.crt;
ssl_certificate_key /etc/nginx/ssl/live/certificates/cantusdatabase.org.key;
Expand Down
6 changes: 5 additions & 1 deletion config/nginx/conf.d/cantusdb.conf.staging
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
server {
# redirect all http traffic to corresponding https page
listen 80;

server_name staging.cantusdatabase.org staging-alias.cantusdatabase.org;

server_tokens off;

location ^~ /.well-known/acme-challenge/ {
Expand Down Expand Up @@ -32,8 +35,9 @@ server {
}

server {

listen 443 default_server http2 ssl;

server_name staging.cantusdatabase.org;

# ssl_certificate /etc/nginx/ssl/live/certificates/cantusdatabase.org.crt;
# ssl_certificate_key /etc/nginx/ssl/live/certificates/cantusdatabase.org.key;
Expand Down

0 comments on commit 3b650b1

Please sign in to comment.