Nginx and Tomcat 6 proxy pass
- by Patrick Schneider
i've got problems tp configure nginx as reverse proxy for an tomcat application.
I want to set domain www.example.com/blog to pass to an tomcat application.
nginx-site:
server {
listen 80;
servername example.com;
location /blog {
proxy_pass http://localhost:8080/blog;
proxy_redirect off;
}
}
Now when i call on my browser http://example.com/blog it redirects to localhost/blog which does not work.
curl http://localhost:8080/blog -H "host: example.com/blog" -v
shows a 302 to localhost/blog
Any ideas?