Skip to content

Commit

Permalink
Updated the datacommons config files with the same changes that we di…
Browse files Browse the repository at this point in the history
…d in #5744 (#5748)
  • Loading branch information
hectorcorrea authored Jan 15, 2025
1 parent 63977d5 commit 4b30b9b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 38 deletions.
9 changes: 8 additions & 1 deletion roles/nginxplus/files/conf/http/datacommons.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# ================
# PLEASE NOTE THAT if you make changes to this file you probably also
# want to make the same changes to pdc-describe|discovery_prod.conf
# ================

# Ansible managed
proxy_cache_path /var/cache/nginx/discovery-prod/ keys_zone=discovery-prodcache:10m;
proxy_cache_path /var/cache/nginx/describe-prod/ keys_zone=describe-prodcache:10m;
Expand Down Expand Up @@ -39,7 +44,7 @@ server {
ssl_prefer_server_ciphers on;
client_max_body_size 0;

# Redirect top level traffic to /discovery
# Redirect top level traffic to /discovery
# until the top level has content.
location / {
return 302 https://$server_name/discovery/;
Expand All @@ -57,6 +62,8 @@ server {
}

location /describe/ {
app_protect_enable off;

proxy_pass http://describe/describe/;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down
9 changes: 8 additions & 1 deletion roles/nginxplus/files/conf/http/datacommons_staging.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# ================
# PLEASE NOTE THAT if you make changes to this file you probably also
# want to make the same changes to pdc-describe|discovery_staging.conf
# ================

# Ansible managed
proxy_cache_path /var/cache/nginx/discovery-staging/ keys_zone=discovery-stagingcache:10m;
proxy_cache_path /var/cache/nginx/describe-staging/ keys_zone=describe-stagingcache:10m;
Expand Down Expand Up @@ -40,7 +45,7 @@ server {
ssl_prefer_server_ciphers on;
client_max_body_size 0;

# Redirect top level traffic to /discovery
# Redirect top level traffic to /discovery
# until the top level has content.
location / {
return 302 https://$server_name/discovery/;
Expand All @@ -57,6 +62,8 @@ server {
}

location /describe/ {
app_protect_enable off;

proxy_pass http://staging-describe/describe/;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down
41 changes: 5 additions & 36 deletions roles/nginxplus/files/conf/http/pdc-describe_prod.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# ================
# PLEASE NOTE THAT if you make changes to this file you probably also
# want to make the same changes to datacommons.conf
# ================

# Ansible managed
proxy_cache_path /var/cache/nginx/pdc-describe-prod/ keys_zone=pdc-describe-prodcache:10m;

Expand All @@ -12,15 +17,6 @@ upstream pdc-describe-prod {
zone=pdcdescribeprodclient_sessions:1m;
}

#server {
# listen 80;
# server_name datacommons.princeton.edu;

# location / {
# return 301 https://$server_name$request_uri;
# }
#}

server {
listen 80;
server_name pdc-describe-prod.princeton.edu;
Expand All @@ -30,33 +26,6 @@ server {
}
}

#server {
# listen 443 ssl http2;
# server_name datacommons.princeton.edu;

# ssl_certificate /etc/letsencrypt/live/pdc-describe-prod/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/pdc-describe-prod/privkey.pem;
# ssl_session_cache shared:SSL:1m;
# ssl_prefer_server_ciphers on;

# Redirect top level traffic to /describe
# until the top level has content.
# location / {
# return 302 https://$server_name/describe/;
# }

# location /describe/ {
# proxy_pass http://pdc-describe-prod/describe/;
# proxy_set_header X-Forwarded-Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_cache pdc-describe-prodcache;
# health_check interval=10 fails=3 passes=2;
# }

# include /etc/nginx/conf.d/templates/prod-maintenance.conf;

#}

server {
listen 443 ssl http2;
server_name pdc-describe-prod.princeton.edu;
Expand Down
5 changes: 5 additions & 0 deletions roles/nginxplus/files/conf/http/pdc-describe_staging.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# ================
# PLEASE NOTE THAT if you make changes to this file you probably also
# want to make the same changes to datacommons_staging.conf
# ================

# Ansible managed
proxy_cache_path /var/cache/nginx/pdc-describe-staging/ keys_zone=pdc-describe-stagingcache:10m;

Expand Down

0 comments on commit 4b30b9b

Please sign in to comment.