Skip to content
kenichi nakamura edited this page Jan 22, 2015 · 1 revision

The following goes in a server { } nginx config block. It proxies requests at '/' to an Angelo app running at localhost:4567 if it does not find a valid file for the request under the Angelo app's /public directory. Angelo never sees requests for "public" files.

root /path/to/app/root/public;
 
location / {
    try_files $uri @backend;
}
 
location @backend {
    proxy_pass http://localhost:4567;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_redirect off;
}
Clone this wiki locally