Skip to content

Commit

Permalink
use correct nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
shuesken committed May 17, 2023
1 parent afe7d3c commit 8a87863
Showing 1 changed file with 5 additions and 23 deletions.
28 changes: 5 additions & 23 deletions config/bankgreen
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ limit_req_zone $binary_remote_addr zone=ddos_limit:10m rate=10r/s;
server {
server_name data.bank.green nocachedata.bank.green tempdata.bank.green;

listen 443 ssl;
ssl_certificate /etc/ssl/certs/CloudflareOrigin.pem;
ssl_certificate_key /etc/ssl/private/CloudflareOrigin.key;

location = /favicon.ico { access_log on; log_not_found off; }
location /static/ {
root /home/django/bankgreen-django;
Expand All @@ -15,30 +19,8 @@ server {

location /graphql {
limit_req zone=ddos_limit;
limit_req_status 429;
limit_req_status 429;
include proxy_params;
proxy_pass http://unix:/home/django/gunicorn.sock;
}


listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/data.bank.green/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/data.bank.green/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot



}
server {
if ($host = data.bank.green) {
return 301 https://$host$request_uri;
} # managed by Certbot


listen 80;
server_name data.bank.green;
return 404; # managed by Certbot


}

0 comments on commit 8a87863

Please sign in to comment.