Created
September 20, 2022 03:46
-
-
Save mailtodanish/a18f1c43beacfe3df425f03b193475dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name danishwebs.co.in www.danishwebs.co.in; | |
access_log /var/log/nginx/danishwebs-access.log; | |
error_log /var/log/nginx/danishwebs-error.log; | |
root /var/www/react/html; | |
location ^~ /api { | |
client_max_body_size 10m; | |
add_header 'Access-Control-Allow-Origin' *; | |
proxy_pass http://127.0.0.1:5000/; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Prefix /; | |
} | |
location / { | |
try_files $uri /index.html; | |
} | |
location =/ { | |
rewrite ^ https://mailtodanish.github.io/profile-page/; | |
} | |
} | |
server { | |
if ($host = danishwebs.co.in) { | |
return 301 https://$host$request_uri; | |
} # managed by Certbot | |
listen 80 ; | |
server_name danishwebs.co.in www.danishwebs.co.in; | |
return 404; # managed by Certbot | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment