Page 3 of 3 FirstFirst 1 2 3
Results 31 to 38 of 38

Problem with moving posts with Nginx

This is a discussion on Problem with moving posts with Nginx within the Troubleshooting forums, part of the vBSEO SEO Plugin category; Oleg , please check your PM...

  1. #31
    Junior Member
    Real Name
    Sergey Kurdin
    Join Date
    Oct 2007
    Posts
    14
    Liked
    0 times
    Oleg , please check your PM

  2. #32
    Junior Member
    Real Name
    Juan
    Join Date
    Dec 2008
    Posts
    28
    Liked
    0 times
    Hello Per,

    I tried with your config, and works fine for the rewrites, however i have a problem with folders like admincp/ modcp/ vbseo_sitemap/, they simply don't works, error 404.

    In Apache rewrite rules i see that there are some RewriteConds related to this:
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)

    Any idea how can i fix this?

    I'm using nginx version: nginx/0.8.53

    Thanks!

    Quote Originally Posted by JulioF View Post
    Hi, since I solved my question above I'll post the reply for others to see here, we have been running live with nginx since Nov 22:nd...
    Yes, using try_files is recommended if your version of nginx supports it, it is much faster!
    v0.7.27 and later is required.

    Since we do not use the vbseo sitemap generator on our site I have totally skipped that part to improve performance and slim the config...

    The only thing which is required is the first 3 lines, however it introduces the bug with moving a select post from one thread to another specified thread described in post 1 in this thread (confusing yet? )
    Code:
            location /vb/ {
              try_files $uri $uri/ /vb/vbseo.php;
            }
            location ~ ^/vb/.+\.php$ {
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_param SCRIPT_FILENAME $document_root/vb/vbseo.php;
                include       fastcgi_params;
            }
    So the second part of the config, lines 4>8 is what fixes this, do note that you will need to replace the name /vb/ with the location of your forum, which could be /forums/ for example

    Regards, Per Hansson

  3. #33
    Junior Member
    Real Name
    Julio
    Join Date
    May 2009
    Posts
    14
    Liked
    0 times
    Hi Inettive,
    Those should be handled by the rewrite rule for normal PHP files, they do not need to go via vbseo.
    In the default nginx config file this would be at the end of the file by this rule; (Please note I'm using UNIX sockets instead of TCP in this example).
    Code:
            ## Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
            location ~ \.php$ {
                fastcgi_pass   unix:/dev/shm/php.sock;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root/$fastcgi_script_name;
                include        fastcgi_params;
            }
    Regards, Per Hansson

  4. #34
    Senior Member MentaL's Avatar
    Real Name
    MentaL
    Join Date
    Oct 2005
    Location
    Wales
    Posts
    427
    Liked
    8 times
    How would those who have used Nginx say its stability and performance compares to say.... Litespeed?

  5. #35
    Junior Member
    Real Name
    kiksilog
    Join Date
    Feb 2010
    Posts
    7
    Liked
    0 times
    Code:
            location /vb/ {
              try_files $uri $uri/ /vb/vbseo.php;
            }
            location ~ ^/vb/.+\.php$ {
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_param SCRIPT_FILENAME $document_root/vb/vbseo.php;
                include       fastcgi_params;
            }
    what do I need to insert to make the sitemaps work?

    going to

    http://myforum/sitemap_index.xml.gz

    yields 404

    Please help me convert this one

    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

    to try_files

  6. #36
    Junior Member
    Real Name
    Julio
    Join Date
    May 2009
    Posts
    14
    Liked
    0 times
    Hi, you could try something like this.
    Since I don't actually use the sitemap feature I have not tested this rewrite at all... (So please provide feedback)
    Code:
            location /vb/ {
              try_files $uri $uri/ /vb/vbseo.php;
            }
            location ~ ^/vb/.+\.php$ {
                fastcgi_pass  unix:/dev/shm/php.sock;
                fastcgi_param SCRIPT_FILENAME $document_root/vb/vbseo.php;
                include       fastcgi_params;
            }
            location ^/vb/((urllist|sitemap_).*\.(xml|txt)(\.gz)?) {
               rewrite ^/vb/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /vb/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1;
            }
    Regards, Per Hansson

  7. #37
    Senior Member TECK's Avatar
    Real Name
    Floren Munteanu
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    788
    Liked
    0 times
    Blog Entries
    2
    Floren Munteanu @ Axivo Inc.

  8. #38
    vBSEO.com Webmaster Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    23,111
    Liked
    622 times
    Blog Entries
    4
    We are sorry Floren but those rules are not proper rules and Axivo Inc solved nothing for us. Please stop claiming false things.

    The proper rewrite rules to use with Nginx and vBSEO are as following ( the same rules i supplied to the thread you created privately )
    Code:
            location / {
                    rewrite ^/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last;
    
                            try_files $uri $uri/ /vbseo.php?$args;
            }
    
            if ($request_filename ~ "\.php$") {
                    rewrite                         ^/(.*)$ /vbseo.php last;
            }
    You still don't want to understand but with this rules , everything ( inline.mod , lastpost on forumhome , moving posts etc..) are working 100% correct.

    You can contunie claming what ever you want on your site but please stop claiming things on vBSEO.com
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

Page 3 of 3 FirstFirst 1 2 3

Similar Threads

  1. moving subforums below posts of forums
    By msimonds in forum General Discussion
    Replies: 8
    Last Post: 10-16-2010, 03:29 AM
  2. Heh got an odd problem since moving.
    By AdamUOF in forum Troubleshooting
    Replies: 2
    Last Post: 08-25-2008, 03:53 PM
  3. Number of posts per page - URL problem
    By NeutralizeR in forum Troubleshooting
    Replies: 2
    Last Post: 03-24-2008, 10:14 AM
  4. Vbseo Problem After Moving Forum to Root
    By huntz in forum Troubleshooting
    Replies: 3
    Last Post: 01-08-2007, 03:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •