Nginx Redirect Issues.

I am posting this figuring it is a long shot in the dark that anyone will answer.  I am running Nginx 1.4.4. with APC  I have been spending most of the time working on a test site that was a clone of a production site.  I needed to update the sites to 7.1.4 and found the point version to be a beta; I posted about that on the forums.  It was decided that since the beta 7.1.2 was only a week from the 7.1.2 final that no changes had been made and it was safe to remove the beta designation and proceed with the upgrade on the test site.  Everything appeared to be working.  I then proceeded to upgrade the other sites on the server.  Yesterday I noted that the production site kept redirecting to the test site.  I have checked all configuration of Nginx and have cleared the APC several times.  I even made edits to the Nginx configs to see where the problem lies.  I ran a check today on the HOSTS in the header wondering if that was a problem since Nginx reads the HOSTS to determine which server block to load.  I disabled the test site and I see that I am getting an endless redirect between loading a production site and loading the test site.  Since the test site is disabled, Nginx then loads the first server block which in turns tries to load the test site which fails and so Nginx loads the first server block again and this repeats until the browser ends the redirect.  I have examined this using Firebug's console so can see what is happening; which redirects are happening.

I have checked all the config files to make sure the paths are correct, have checked all the header.inc.php files.  DNS appears to be correct, I even removed the wildcard DNS entry.  All caches have been cleared included the browser cache. If the test site is left in place, it will load and no redirect is encountered.  Trying to go to the production site results in a redirect to the test site which then loads and the redirect ends there.

As I think about this; everything wants to redirect to the Test Site; which was the first site to be upgraded.  I am wondering if I wrote something to the upgrades without realising it that is causing all sites to be redirected to the Test Site?

Anyone have any answers?

Geeks, making the world a better place
Quote · 10 Feb 2014

did you by chance copy your header.inc.php file from your test to your production server. I made that mistake a while back.

caredesign.net
Quote · 10 Feb 2014

 

did you by chance copy your header.inc.php file from your test to your production server. I made that mistake a while back.

I have examined all the header.inc.php files.  The production site header is correct.  something else must be causing a redirect.  Which files in Dolphin are responsible for redirection; just the header.inc?

Geeks, making the world a better place
Quote · 10 Feb 2014

other than the header.inc.php file, the only thing I can think of is the .htaccess file - unless you hardcoded the site url somewhere

caredesign.net
Quote · 10 Feb 2014

 

other than the header.inc.php file, the only thing I can think of is the .htaccess file - unless you hardcoded the site url somewhere

Nginx does not use .htaccess files; the only thing about them is that if one exists in a directory, then Nginx will deny all so that the Dolphin .htaccess files that do this task still work.  As for the dolphin rewrites file that is included in the server block, those don't contain a URL.

Thanks for the help Professor.

Geeks, making the world a better place
Quote · 10 Feb 2014

OK, I deserve an award on this one.  Whatever award you give for doing something stupid, I deserve it.

I was FTPed into the server working on the upgrade of the site to 7.1.3 and then 7.1.4.  I downloaded the header.inc.php file from the test site to the Dolphin 7.1.3 upgrade directory on my local drive to check on something with the intention of deleting the file.  However, I got busy and forgot.  So when I uploaded the upgrades to the production site I uploaded to the root of the site the header.inc.php file that pointed to the test site.  Now I don't understand why that header.inc.php file in the root of the site was being loaded but it must have been because it was what was causing the redirect to the test site.  The only reason I went to look at the upgrades on my local drive was because this issue started around the time I upgraded the production site after testing the upgrades on the test site.

Geeks, making the world a better place
Quote · 10 Feb 2014

roflmfaop

caredesign.net
Quote · 11 Feb 2014

Now that the laughter has died down; why was that header.inc file in the root of the site being loaded?  What was loading that file so that it was being processed?

Geeks, making the world a better place
Quote · 11 Feb 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.