Solved

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

Posted on 2016-10-25
9
151 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 83

Expert Comment

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

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 125 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 125 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 77

Accepted Solution

by:
arnold earned 250 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 77

Assisted Solution

by:arnold
arnold earned 250 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

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…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

810 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