Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Centos webserver to not show ip address

Posted on 2010-01-11
8
Medium Priority
?
736 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
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
Who's Defending Your Organization from Threats?

Protecting against advanced threats requires an IT dream team – a well-oiled machine of people and solutions working together to defend your organization. Download our resource kit today to learn more about the tools you need to build you IT Dream Team!

 

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

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

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…
This article will help to fix the below errors for MS Exchange Server 2016 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

580 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