Page 1 of 1

[phpBB3] Nginx upgrade causes redirect loop

Posted: Wed May 09, 2012 1:39 pm
by redburn
I have a phpBB3 forum running on Apache (port 8080), with Nginx as the reverse proxy for static content (on port 80). This was all working fine until I tried upgrading Nginx to the latest version (1.2.0). After upgrading, the homepage gets stuck in an endless loop of 301 redirects. This only affects the homepage, all other pages are still working, and this only happens when the Magic SEO URLs plug-in is enabled -- when I disable it, the homepage works fine, but all other forum URLs are obviously not rewritten.

Do you have any ideas as to what in Magic SEO URLs could be causing the homepage to endlessly redirect to itself? The Apache mod_rewrite rules haven't changed. Unfortunately, I cannot show this in action, because then my forum homepage would be inaccessible. I've downgraded Nginx back to the previous stable release, but would like to be able to upgrade.

Any help would be appreciated. Perhaps you can point me in a direction so that I can continue investigating. Currently, I'm stuck.

Re: [phpBB3] Nginx upgrade causes redirect loop

Posted: Wed May 09, 2012 2:07 pm
by inveo
If you mean by "disabling" commenting out installation line in common.php file and leaving .htaccess file intact then it seems there is a bug in Nginx - some server vars are getting incorrect values.
Link to phpinfo.php page would help in pointing what exactly is going wrong there.

Re: [phpBB3] Nginx upgrade causes redirect loop

Posted: Thu May 10, 2012 2:22 am
by redburn
It's a strange problem, the cause of which must be somewhere in the middle between Magic SEO URLs and the new Nginx, but I don't think I'll ever get to it. I've compared the server variables and headers, but don't see anything that could cause this. However, since it's only affecting the homepage, I managed to come up with a workaround:

Code: Select all

        if ($request_filename ~ \/$) {
                return  404;
        }

This returns a 404 for every hit to http://www.example.com/ only (i.e. the homepage), and for every 404 I have a fallback function like this, redirecting to Apache:

Code: Select all

        error_page      404 = @fallback;

        location @fallback {

                proxy_pass                              http://127.0.0.1:8080;

        }

It works, so I'm happy. Thanks for your time.

Cart  
(empty)

Cart Check out  »

Prices are tax inclusive.

The VAT rate for your country (US) * is 0,0 % because it is not a member of the European Union (EU).

* Please create an account if your country does not match.

Community feed
  • [Zen Cart] Can't execute Magic SEO URLs sitemaps
    I installed Magic SEO URLs Sitemaps Add-On for ZenCart MSU4.x/MSU5.x 2.0 on my server, when I try to generate sitemaps using: https://www.pechesudv155.owally.com/sitemaps.php I received :...
    by peter@pechesud.com
  • [phpBB3] Sharing users between phpBB / PrestaShop
    Hi i have 2 question 1- prestashop module support phpBB 3.3 ? 2- why we can not login in prestashop and phpbb with same user?
    by zohall
  • [phpBB3] AJAX Userinfo Extension
    Hi! I'm having trouble with this extension: https://www.phpbb.com/customise/db/exte ... _userinfo/ I tried asking support from the author but for no avail, since now. My request for support...
    by Lord Phobos
  • [phpBB3] Upgrade to phpBB 3.2.3
    Hello.. after Upgrade to phpBB 3.2.3 I am getting this message.. How can I solve this issue..? Thank you
    by ingbrzy
  • [phpBB3] URL path changed
    Hello.. I have changed my site path after moving to new hosting and now can not activate SEO module.. new path http://www.miuios.cz/domains/miuios.cz/ could you help me? thank you
    by ingbrzy2
Join our support forum » Pre-Sales Questions »
Featured Testimonials

AWESOME! One of the best support service i ever had online! I purchased the PrestaShop Theme Provider and Inveo team was so supportive and helpful to install the module! The module is working super well and gives a professional looking to my blog right now! Thank you so much!

Florence, the owner of Timeless luxury - Florenz

We are glad with our business relationship with the folks at Inveostore.com. They are very knowledgeable and speed of support is second to none. They have also gone the extra mile to assist us in writing codes to make other urls to have the nicely formed urls. Kudos to all the team at Inveo and keep up the good work. Looking forward...

Issac, the owner of Clevershoppers.com

More Testimonials »