Redirecting any URI to a unique one

Thomas iamkenzo at
Thu Apr 24 16:39:09 MSD 2008

I am advancing a bit.

If I enter, I get the servlet.

If I enter, for some magical
reason, I get redirected with: and
Firefox display that it failed to load the page.

I don't know who is appending this index.jsp, it is certainly not me.

server {
  listen        80;

  error_log     /usr/local/nginx/logs/servlet.log notice;

  location / {

    rewrite /.+ / break;

    root      /usr/local/tomcat-4.1/webapps/servlet/WEB-INF/classes;
    index     index.html;

    proxy_redirect      off;

    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;

  } # End of the location /
} # End of server

More information about the nginx mailing list