Skip to content

Instantly share code, notes, and snippets.

@cra
Last active March 25, 2021 12:17
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cra/6dd1e9d11a7ad25ccb66d048400eb1ad to your computer and use it in GitHub Desktop.
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=480m use_temp_path=off;
server { listen 80; listen [::]:80;
server_name edexp.club;
# Backend
location /api/ {
# rewrite ^/api(.*)$ $1 break;
proxy_pass http://localhost:5000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
# Frontend
#location / {
# root /var/www/edexp.club/frontend/;
# index index.html
# try_files $uri $uri/ /index.html;
#}
root /var/www/edexp.club/frontend/;
index index.html
try_files $uri $uri/ /index.html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment