: Page requesting content from another IP I was running a drupal website on Server 01 with IP1 on the domain name example.com with the configuration centos 6 and apache. As we were having a
I was running a drupal website on Server 01 with IP1 on the domain name example.com with the configuration centos 6 and apache.
As we were having a traffic spike, we wanted a more powerful machine. So we decided to change to ubuntu 13.10 and nginx. Me with my host, built server 2 with IP2 and installed ubuntu 13.10 and nginx. Then we copied the /var/www/html folder of Server 01 to /var/www folder on server 02, created a mysql dump of databases on Server 01, transferred the same to Server 02, and created a same database environment there. Connected drupal to the databases. Tested the work by accessing IP2 on browser. Everything was working fine there except some drupal issues. Decided to proceed with the transfer anyway.
My host then switched IPs. Now we are having Server 01 with IP2 and Server 02 with IP1. The end result was satisfactory. However, a strange behavior was noted.
When any page on the site is loading (after IP switch), it requests for a resource (a png image) on IP2, which is actually on Server 01 at the moment. As my host shut down server 01, the request bring a not found error. As the default coding procedure, all requests on drupal are made relative to the domain name (or the IP). Multiple clearing of caches did not solve the issue.
My question is how did the script even know that such an IP exists? How can I track the part of the script that generates this request?
If my question is missing any information, please comment below and I will add it as edits.
Any help will be greatly appreciated.
Edit:The issue resolved on itself. Don't know what solved it, but when I disabled a CDN, completely re written the configuration page and changed the protocol to https, the issue resolved. Even though the exact cause that created it still remains unknown to me, I am glad that it no longer exists.
More posts by @Reiling115
1 Comments
Sorted by latest first Latest Oldest Best
to clarify your question it seems like you have a broken image link after a sever migration on drupal based site? when the link was created you must have visited your server by ip address vs domain name. then drupal created a full link to the image versus creating a relative link. you should update whatever code, module or plugin that is generating the link with a relative link, and if your ip switches again you wont have such issues. an nginx rewite rule can also 302 redirect to correct domain, but its a sloppy fix and better as a backup measure for broken links.
PS now that you are on nginx, using it as a reverse proxy means you can expand to handle tons of traffic.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.