I managed to get it to work with the following conf:
server { root /var/www; listen 80; server_name _; location ~* /remote_data { # Proxy request to node: proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-NginX-Proxy true; proxy_pass http://node_app; proxy_redirect off; break; } location / { index index.html index.htm; location ~ \.(js|css|png|jpg|jpeg|gif|ico|html|less)$ { expires max; break; } rewrite ^/(.*)?$ /index.html?q=$1 last; }
source share