I was trying to deploy a war file on Tomcat on a production Server and i am facing some problems. I can access my site using www.mydomain.com:8080/myappname but what I really want is to access my app by just using www.mydomain.com. I would really appreciate any kind of help as I'm really stuck on how to solve this issue. Note: I am using tomcat as a web server Thanks very much! Anteneh
Asked
Active
Viewed 70 times
0
-
You may want to front tomcat with apache or nginx, since tomcat isn't really very good as a general web server (for example serving static files) – Joachim Isaksson May 02 '14 at 17:45
-
Thanks @JoachimIsaksson , but i think it is too late for me to change the server. could you please suggest an alternative solution? Thanks – Anteneh May 02 '14 at 17:47
-
[Here](http://serverfault.com/questions/293348/configure-nginx-for-jboss-tomcat) is some info on how to use nginx for static files and forward servlet requests to tomcat. – Joachim Isaksson May 02 '14 at 17:49
1 Answers
0
You need to change Tomcat's default port to 80. See instructions at http://www.mkyong.com/tomcat/how-to-change-tomcat-default-port/
In addition, you need to change the context path of your application. You can find the instructions on this thread How to set the context path of a web application in Tomcat 7.0

Community
- 1
- 1

user3594557
- 23
- 6
-
The problem with running it on port 80 (using this method) is that it'd have to run as root/administrator, which security wise isn't a very good idea. – Joachim Isaksson May 02 '14 at 17:50
-
Thanks @user3594557 , another problem with port 80 is that another process is using it and i can't change it. And if it can help the machine is running on Windows Server 2008 r2. thanks – Anteneh May 02 '14 at 18:14
-
@Anteneh If something else is running on port 80, you'll need to make that process forward the requests. The only other way to access the site without using a port number is to either 1) run the process on port 80 2) Map accesses to port 80 to actual port 8080 in your firewall. – Joachim Isaksson May 02 '14 at 18:16
-
-
@JoachimIsaksson , the problem i have it that , I don't have control over the firewall of the server, I am using a hosting company. what do you suggest? – Anteneh May 02 '14 at 18:38