0

I've managed to deploy my war file to Tomcat. However, I'm only able to access my website via foo.com:8080/SomeApp. What I'd like is to access my website normally e.g., foo.com should take me to my website automatically. This isn't happening though? How do I fix this?

Thanks!

OckhamsRazor
  • 4,824
  • 13
  • 51
  • 88

1 Answers1

0

You probably have installed a SomeApp.war. If your webapp is supposed to be run in the root (meaning /) context, it should be named ROOT.war. However, if you just want a forward from http://foo.com/ to http://foo.com/SomeApp, you can add a index.html in your Tomcat's webapps folder containing the meta header:

<meta http-equiv="refresh" content="0; URL=/SomeApp" />

For port redirecting (80 -> 8080), it depends on your installation: Do you use an Apache HTTPD with your tomcat, then take a look at How do I redirect from Apache to Tomcat?.

Community
  • 1
  • 1
f_puras
  • 2,521
  • 4
  • 33
  • 38