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
Solved

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

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

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

837 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