Solved

Setup tomcat on VPS

Posted on 2014-04-14
9
801 Views
Last Modified: 2014-04-22
Hello there,

I have a VPS machine and I installed Tomcat on it. I tested the tomcat by running the localhost:8080 on the VPS and it works as expected. Now how do I config tomcat so when I enter the ip address of the vps I can see the tomcat home page.

cheers
Zolf
0
Comment
Question by:zolf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 36

Accepted Solution

by:
mccarl earned 500 total points
ID: 40002879
If http://localhost:8080/ works for you then (lets assume that your IP is 123.123.123.123) does the following also work? http://123.123.123.123:8080/

If not, then you have some routing/firewall issues to sort out to be able to access your server.

But if the above DOES work, then is the question that you have just.... How to get rid of needing to add the 8080 part? ie. you want to access it via http://123.123.123.123/

For this you need to edit the "server.xml" file that is in the "conf" directory of your Tomcat insallation. In that file, find a line that looks something like...
<Connector port="8080" protocol="HTTP/1.1"

Open in new window

...and change the port number to port 80, as below...
<Connector port="80" protocol="HTTP/1.1"

Open in new window

Now, restart Tomcat and assuming that there are no other web servers running on port 80 on this machine, it should start up fine and then you can access Tomcat via a URL similar to the above.
0
 

Author Comment

by:zolf
ID: 40003156
mccarl

thanks a lot for your comments.

 
does the following also work? http://123.123.123.123:8080/

no it is not working.
I have also setup IIS on that server for ftp features. Now when I type the IP only it shows me the IIS default page. But when I enter the ip with the 8080 in the browser it is not opening the tomcat default page.
0
 
LVL 36

Expert Comment

by:mccarl
ID: 40003177
no it is not working.
Ok, so I can only think of two issues that it could be...

- Firewall that is allowing traffic on port 80 but denying traffic on port 8080
- Check your "server.xml" file that I mentioned above, and in the <Connector> element that references port 8080, check that there is NO "address" attribute set. If there is anything like address="127.0.0.1" or such, remove that attribute from the connector and it should start listening on all IP addresses.
0
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
LVL 62

Expert Comment

by:gheist
ID: 40003245
What procedure you used to "install" tomcat? e.g. I unzip the zip file and that one listens on all addresses.
0
 

Author Comment

by:zolf
ID: 40004723
mccarl

thanks for your comments. I will check firewall and get back


gheist

I used the .exe package to install tomcat. I used all default settings.as I mentioned I have IIS listening on port 80 and I have tomcat on 8080.

by the way is it possible to run the tomcat with entering that 8080,but also have IIS running.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40005353
So it listens on all IPs
You have to configure firewall, depending on your windows version you may need to allow server access for java.exe, tomcat service .exe, port 8080, or more than one of them...
0
 
LVL 36

Assisted Solution

by:mccarl
mccarl earned 500 total points
ID: 40005587
by the way is it possible to run the tomcat with entering that 8080,but also have IIS running
Yes, it is possible to have IIS act as a sort of "proxy" for the Tomcat requests using a protocol known as AJP. In this sense, you can install a "redirector" in your IIS that intercepts a subset of the requests directed to IIS and passes them (via this AJP protocol) to your Tomcat instance. Have a look at this (just one particular) example of a IIS-AJP "redirector"...
http://tomcatiis.riaforge.org/

I will check firewall and get back
That is (as far as I can tell) probably the only possibility for why this isn't working now, if you have "used all default settings" from a default installation of Tomcat.
0
 

Author Closing Comment

by:zolf
ID: 40009996
cheers
0
 
LVL 36

Expert Comment

by:mccarl
ID: 40016473
Your welcome! :)
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question