?
Solved

Centos webserver to not show ip address

Posted on 2010-01-11
8
Medium Priority
?
720 Views
Last Modified: 2012-05-08
I have a tomcat 5 instance running on Centos 5.4. The web app works fine.  Centos is on a static IP address in DMZ. Registered the host name with a hosting company as
   www.mywebserver.com
  When you go to the IE and type www.mywebserver.com  it goes to the webapp and first pages comes up fine. The problem is when I click on any link on the web page that is within the site, It address bar changes itself to the IP address of the server which I dont want it to do. I do not want to use domain masking from the registering company either because it hides the url string which causes certain pages to fail.  Need Help.

Thanks.
0
Comment
Question by:Digitaleye
[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
8 Comments
 
LVL 3

Expert Comment

by:dgware
ID: 26288570
I think your tomcat is where the problem is at, not the OS. Configure tomcat to use hostname instead of ip address, sorry i can't remember how to do it. It's a start though.

Good luck
0
 
LVL 26

Expert Comment

by:jar3817
ID: 26290011
I think it's the webapp itself. What app is this? Many of them have a config parameter to enter the hostname to use (for links and whatnot) and if you leave it blank or fill it in wrong the links go screwy. I've seen it with a bunch of java webapps.
0
 
LVL 8

Expert Comment

by:shaunak
ID: 26297254
Set the context path correctly in your web.xml file present in WEB-INF folder
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Digitaleye
ID: 26299457
Hi Shaunak:
   Do you have any example or weblink.  Thanks for checking into it.
0
 
LVL 8

Expert Comment

by:shaunak
ID: 26308021
0
 

Author Comment

by:Digitaleye
ID: 26309247
I have checked the web.inf file and it is setup correctly. The webapp works great. What do you think of this article.
http://www.howtoforge.com/creating-your-own-webserver-with-bind-and-apache-centos5

I have not done the steps above. I just went to Go daddy and forwarded the domain name to my IP address. Do you think I need that setup for my web server as well?
0
 
LVL 8

Accepted Solution

by:
shaunak earned 2000 total points
ID: 26317002
Nope. That is Not required.
When you have a apache-tomcat setup, normally apache handles all types of files except for jsp. Whenever there is jsp request apache internally forwards the request to tomcat thru 8009 port with the help of Coyote/JK2 AJP 1.3 Connector

So I think in your server.xml file in $TOMCAT_HOME/conf there must be something like
<Alias>IP</Alias> in the <Host name="domain.com" schema. Just check with that and try altering that server.xml file.



0
 

Author Comment

by:Digitaleye
ID: 26326552
Thanks everyone for looking into it. The problem was actually on the go daddy side. They were resolving the name to IP address. It is all good now.
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

Occasionally you run into the website or two that will not resolve properly using your own DNS servers.  Some people simply set up global forwarders for their DNS server.  I don’t recommend doing this because it can cause problems resolving addresse…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

771 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