Solved

Setup tomcat on VPS

Posted on 2014-04-14
9
781 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 35

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 35

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
Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

 
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 35

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 35

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

Suggested Solutions

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

752 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