?
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
?
300 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
[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
  • 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 25

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
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 
LVL 79

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 79

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 25

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

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

Question has a verified solution.

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

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month9 days, 21 hours left to enroll

762 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