Solved

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

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

Expert Comment

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

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 24

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
 
LVL 76

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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 76

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 24

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now