listen [::]:443 ssl http2 default_server;
- # TODO: do we want to do this?
- # Serve static files if found, otherwise proxy to Sanic
+ # React app (base URL)
location / {
- root /var/www;
- try_files $uri @sanic;
+ root /usr/share/nginx/html;
+ index index.html index.htm;
+ try_files $uri $uri/ /index.html =404;
}
+
# Ghost
+ client_max_body_size 50m;
root /var/www/blog/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)
location ^~ /blog/ {
allow all;
}
- client_max_body_size 50m;
-
# Sanic
- location @sanic {
+ location /api/ {
proxy_pass http://$server_name;
# Allow fast streaming HTTP/1.1 pipes (keep-alive, unbuffered)
proxy_http_version 1.1;