Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Setup tomcat on VPS

Posted on 2014-04-14
9
Medium Priority
?
810 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 2000 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
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 2000 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

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

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

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
What You Need to Know when Searching for a Webhost Provider
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

670 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