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 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                    ;


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


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
  • [phpBB3] AJAX Userinfo Extension
    Hi! I'm having trouble with this extension: ... _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 could you help me? thank you
    by ingbrzy2
  • [phpBB3] Chinese language support
    Hi, i bought magic seo for phpbb because it says that it supports a wide range of alphabets and UTF-8, however i found that it doesn't. I'm preparing a website in Chinese and all forums having a...
    by iwsmike
  • [WP2PS] Yoast SEO plugin
    Thanks for your support installing the PS-WP integration. However there is some errors when PS-WP integration is activated. 1. Error generating sitemap with Yoas SEO plugin (it disappears when...
    by argidomin
Join our support forum » Pre-Sales Questions »
Featured Testimonials

Wow, thank you there is a huge difference from where it was.

Henri, the owner of TorchSA

AWESOME! Worked like a charm. I now understand why you used the word Magic in its name. Quick, easy, painless, gets the job done, and beautiful. Thanks a Million for creating this fantastic tool and for the quick excellent support.

Mohammad, the owner of TradersCity

More Testimonials »