Author Topic: HTTP Test page on IP Change  (Read 73 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
HTTP Test page on IP Change
« on: March 16, 2019, 10:42:17 AM »
Hello,

My websites were working fine, before I installed PHP-FPM and forced APACHE to use PHP-FPM 7.2.1. Now almost all of the websites are working fine. But yesterday I found out one of the website is showing HTTP Test Page. And today another website showing Test Page. Now, What I did was, I changed the IP address of the websites (that was: XX.XX.XX.220) to the Shared IP address(XX.XX.XX.218) defined in CWP and it worked fine.

before doing that, I checked all my DNS zones for the affected sites, rebuilt them, rebuit vhosts file. Created Domains configuration for those affected sites but it never worked.

Now I wanted these sites to stay on XX.XX.XX.220, not on the Shared IP given in CWP XX.XX.XX.218.

Please help

Thanks,
« Last Edit: March 16, 2019, 10:43:51 AM by nauman »

Online
***
Re: HTTP Test page on IP Change
« Reply #1 on: March 16, 2019, 10:32:42 PM »
I have never been through this situation, but instead I would first try to see if any IP has been left to change, with the following command:
Code: [Select]
# find /var/named -type f -exec grep -l "XX.XX.XX.218" {} +
# find /usr/local/apache/conf* -type f -exec grep -l "XX.XX.XX.218" {} +

If you find a file in the list, you would give it a look at the file, and if you really needed to change the IP, you would use the following command:
Code: [Select]
# find /var/named -type f -exec grep -l "XX.XX.XX.218" {} + | xargs -i perl -pi -e "s/XX.XX.XX.218/XX.XX.XX.220/g" {}
# find /usr/local/apache/conf* -type f -exec grep -l "XX.XX.XX.218" {} + | xargs -i perl -pi -e "s/XX.XX.XX.218/XX.XX.XX.220/g" {}

Regards,
Netino

Offline
*
Re: HTTP Test page on IP Change
« Reply #2 on: March 17, 2019, 05:53:51 AM »
Thanks Netino, I really appreciate your prompt and useful replies...

Actually I do not want to change the IP of that user right now back to XX.XX.XX.220 because I want that web to keep running :-)
So what I did was, another dummy user was there with the IP XX.XX.XX.218 I changed it to XX.XX.XX.220 and so far everything seems working well.


I have executed the following commands:

# find /var/named -type f -exec grep -l "XX.XX.XX.218" {} +
# find /usr/local/apache/conf* -type f -exec grep -l "XX.XX.XX.218" {} +

and zone and conf files regarding the dummy user were not shown.

I would like to wait for about an hour or so to make sure that the change of IP is fully applied on that dummy user and I ll update this thread. But I suspect that this problem is related to that specific user.
« Last Edit: March 17, 2019, 06:18:54 AM by nauman »