node.js - How to use nginx proxy_pass subroutes from node app? -
i have node app running on port 8002 different subroutes '/login' or '/facebook', have nginx (v1.6.0) , next config:
server { hear 80; server_name my-ghost-blog.com ; client_max_body_size 10m; location / { proxy_pass http://localhost:2368/; proxy_set_header host $host; proxy_buffering off; } location ~ ^/(sitemap.xml) { root /var/www/ghost; } location ~ ^/(robots.txt) { root /var/www/ghost; } #proxy node app running on 8002 port location ^~ /auth/ { proxy_pass http://localhost:8002/; } } when go '/auth/' works, when seek go node app'subroute, 404 appears because nginx dont know how handle it.
any ideas?
thanks
node.js nginx proxy
No comments:
Post a Comment