# Sanic
location / {
- proxy_pass http://127.0.0.1:20000; # API server
+ proxy_pass http://127.0.0.1:20000; # API server
# Allow fast streaming HTTP/1.1 pipes (keep-alive, unbuffered)
proxy_http_version 1.1;
proxy_request_buffering off;
# React app (base URL)
location / {
+ #return 302 https://$host/api$request_uri;
root /var/www/app;
index index.html;
#try_files $uri $uri/ /index.html =404;
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
+ # TODO: better redirect based on server, not if?
if ($host = www.dev.nutra.tk) {
return 301 https://dev.nutra.tk$request_uri;
}