[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Cloned web server w Apache keeps routing to old ip address.  Is problem in Apache config?

Posted on 2016-10-25
9
Medium Priority
?
421 Views
Last Modified: 2016-10-27
We were upgrading a web server.  It runs Red Hat and uses Apache.  We basically cloned the server (Clonezilla) and ported it to the new server.  It's running fine, but when traffic comes through the wan interface through the router, it correctly port maps to the new server, then send the session over to the old server (it's still online).  We've checked the router.  Its setup is good.  Port forwards to the new server. Is there something in the httpd.conf file that could redirect it over to the old sites lan ip?
0
Comment
Question by:bhunger
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41859431
Yes.  The 'Listen' line probably still has the old IP address.
0
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 500 total points
ID: 41859442
Also check any '.htaccess' files to make they don't redirect to the old server.
0
 
LVL 26

Assisted Solution

by:Tomas Helgi Johannsson
Tomas Helgi Johannsson earned 500 total points
ID: 41859478
Hi!

Check and compare the httpd.conf file against /etc/hosts file and the ipaddress of the hosts using ifconfig. Since it is a clone you probably have virtualhosts IP mappings in the /etc/hosts pointing still to the old server (it's IP address ).
And it sounds like you are using the IP based virtualhosting setup where namebased setup could be a better approach here
http://www.tecmint.com/apache-ip-based-and-name-based-virtual-hosting/

Regards,
    Tomas Helgi
1
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 81

Accepted Solution

by:
arnold earned 1000 total points
ID: 41859814
There is a large amount of information that is missing from your question.
What is being forwarded, the access to the DATABASE data?
After cloning, were all relevant configuration changes made, such that the access to the DB is local?

after cloning, did you reran anything to reset the networking configuration? Did you manually edited some files to make changes, double check if you have reverse proxy setup and that is where the old IP is referenced.

Besides apache web (htttpd,) do you also have tomcat installed and that components is going to the wrong destination?

Usually, when cloning, the cloned, is brought up without any changes while the original, is removed from the network......
You seem to have gone the cloning route, but using the clone as an additional server such that an oversight in making adjustments/corrections could have missed .......
0
 

Author Comment

by:bhunger
ID: 41862331
It's working now.  Dave, the "listen" parameter didn't list an ip, just a port (80).  Probably should plant the new ip address asap.  Tomas, your comment also made sense in that the web server was picking up instructions from somewhere to go to the old other address (which was still on the lan).

Arnold, yes, there was a db behind the web server.

I'm getting the sys admin to recheck the host files and the httpd.conf file to make sure the old entries are updated accordingly.

One last point.  Some kind of arp caching or old cached routing may have existed on the server which, when deactivated and reactivated, was cleared and resolved the issue.  Thanks.
0
 

Author Comment

by:bhunger
ID: 41862333
Thanks guys.
0
 
LVL 81

Assisted Solution

by:arnold
arnold earned 1000 total points
ID: 41862369
Listen need not reflect an IP in such a setup, the webserver will listen on all active network interfaces/ips.
When you use listen, and you transition the config if the IP is not available the web server will error out and will not start because it can not bind to an IP that does not exist on the system.

So what was going to the old server? the web or the queries to the database?

Only redicts might do that if you have internal DNS server that is still pointing the hostname/domain of the redirected requests to the old server IP. But these should be internal to your lan, and not external user .....
0
 
LVL 26

Expert Comment

by:Tomas Helgi Johannsson
ID: 41862626
Glad to help.
Don't forget to close the question and award points to those that helped. :)

Regards,
    Tomas Helgi
0
 

Author Closing Comment

by:bhunger
ID: 41862634
Thanks
0

Featured Post

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!

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month19 days, 9 hours left to enroll

873 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