Archive is not working - fast-CGI (Nginx + PHP-FPM)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • a1-b
    New Member
    • Aug 2008
    • 14
    • 3.7.x

    Archive is not working - fast-CGI (Nginx + PHP-FPM)

    Hello my forum is working in fast-cgi mode (nginx and php-fpm). Please tell me how to make forum archive working on this setup without param cgi.fix_pathinfo set to 1 because it makes the site vulnerable (detail description http://cnedelcu.blogspot.ru/2010/05/nginx-php-via-fastcgi-important.html ) and I have already got many malware on my forum because of this and it takes a lot of time to determine how I got hacked and now with this param set to 0 I always got error (no input file specified) when trying to open any url of archive where rewrite is needed. So I need correct config for nginx and php-fpm. Please help me.
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74123

    #2
    It most likely won't work. It was designed to work with Apache. With today's modern search engines, the Archive doesn't provide much benefit. When it was created ten years ago, search engines weren't as intelligent.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • snakes1100
      Senior Member
      • Aug 2001
      • 1249

      #3
      It works just fine, add these rewrite rules to your vhost.conf file, add above your fastcgi block

      Code:
              location /archive {
                      rewrite ^/archive/index.php/t-([0-9]+)\.html /archive/index.php?t-$1.html last;
                      rewrite ^/archive/index.php/f-([0-9]+)\.html /archive/index.php?f-$1.html last;
              }
      Gentoo Geek

      Comment

      • Santehnik
        New Member
        • Nov 2007
        • 1

        #4
        This code have working page navigation in archive:
        Code:
                location /archive {
                        rewrite ^/archive/index.php/t-([0-9]+)\.html /archive/index.php?t-$1.html last;
                        rewrite ^/archive/index.php/f-([0-9]+)\.html /archive/index.php?f-$1.html last;
                        rewrite ^/archive/index.php/t-([0-9]+)-p-([0-9]+)\.html /archive/index.php?t-$1-p-$2.html last;
                        rewrite ^/archive/index.php/f-([0-9]+)-p-([0-9]+)\.html /archive/index.php?f-$1-p-$2.html last;
                }

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...