Redirecting any URI to a unique one

Thomas iamkenzo at
Thu Apr 24 13:45:06 MSD 2008


I have a website, let's call it

On this website, I have a servlet running on tomcat at:

>From the outside world I want people to access that servlet using the
following URL:

Currently in my nginx conf file I have:

server {

location / {

The problem is that if anyone enters a URL such as, Tomcat spits back an ugly 404
page. So I would like that whatever request comes in, tomcat only sees, and thus serves the only servlet I have

Should I use a rewrite for that? Am I doing it the correct way? I have
tried a few things but they all failed, the page couldn't load

More information about the nginx mailing list