Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ==================================NGINX CONFIG SITES-ENABLED==================
- # Let's Encrypt is setup elsewhere. It worked up until I deployed the React app
- limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s;
- server {
- limit_req zone=mylimit;
- # add_header 'Access-Control-Allow-Origin' '*'; # to test on my local machine
- listen 80;
- server_name 0.0.0.0;
- # return 301 https://www.website.com; # don't force a redirect
- location / {
- include proxy_params;
- proxy_pass http://127.0.0.1:8000; # port where Gunicorn is listening to
- proxy_http_version 1.1;
- }
- }
- server {
- limit_req zone=mylimit;
- # add_header 'Access-Control-Allow-Origin' '*'; # to test on my local machine
- listen 443 default ssl;
- server_name website www.website.com;
- location / {
- include proxy_params;
- proxy_pass http://127.0.0.1:8000; # port where Gunicorn is listening to
- proxy_http_version 1.1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement