Make /api available on just the IP

We might want to also show something else than
the naked domain placeholder page when just
accessing the ip
This commit is contained in:
Johannes Zellner
2016-01-22 19:28:40 +01:00
parent a2899c9c65
commit 63c06a508e
+18 -1
View File
@@ -58,6 +58,14 @@ http {
ssl_certificate cert/host.cert;
ssl_certificate_key cert/host.key;
# increase the proxy buffer sizes to not run into buffer issues (http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffers)
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
# Disable check to allow unlimited body sizes
client_max_body_size 0;
error_page 404 = @fallback;
location @fallback {
internal;
@@ -65,7 +73,16 @@ http {
rewrite ^/$ /nakeddomain.html break;
}
return 404;
location / {
internal;
root /home/yellowtent/box/webadmin/dist;
rewrite ^/$ /nakeddomain.html break;
}
location /api/ {
proxy_pass http://127.0.0.1:3000;
client_max_body_size 1m;
}
}
include applications/*.conf;