Page 1 of 2 1 2 LastLast
Results 1 to 15 of 23
Like Tree5Likes

howto for nginx

This is a discussion on howto for nginx within the General Discussion forums, part of the vBulletin SEO Discussion category; has someone instructions on how to use vbseo with nginx? using vbulletin with nginx is not too hard, but the ...

  1. #1
    Junior Member
    Real Name
    Tom
    Join Date
    Jan 2007
    Posts
    18
    Liked
    0 times

    howto for nginx

    has someone instructions on how to use vbseo with nginx?

    using vbulletin with nginx is not too hard, but the missing .htaccess feature of nginx creates some headaches

    tnx

  2. #2
    Senior Member Spenser's Avatar
    Real Name
    Heiko
    Join Date
    May 2008
    Location
    Nüdlingen, Germany
    Posts
    388
    Liked
    0 times
    Is there a special reason you're using nginx?

  3. #3
    Junior Member
    Real Name
    Tom
    Join Date
    Jan 2007
    Posts
    18
    Liked
    0 times
    there are many many reasons for using nginx: give a look here nginx - the raise of a new giant - vBulletin Community Forum

  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Here are rewrite rules to be used with vBSEO for nginx:
    Code:
    location /forums/ {
    
    rewrite ^/forums/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /forums/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last;
    
    if ($request_filename ~ "\.php$" ) {
    rewrite ^(.*)$ /forums/vbseo.php last;
    }
    
    if (!-e $request_filename) {
    rewrite ^/forums/(.*)$ /forums/vbseo.php last;
    }
    
    }
    "/forums/" should be replaced with vB folder name.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  5. #5
    Junior Member
    Real Name
    Tom
    Join Date
    Jan 2007
    Posts
    18
    Liked
    0 times
    thank you for the rules!

    is there any precaution to take before vbseo upgrade using nginx?

  6. #6
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    No other vBSEO-related changes are required.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  7. #7
    Junior Member
    Real Name
    Tom
    Join Date
    Jan 2007
    Posts
    18
    Liked
    0 times
    Hi Oleg,
    could you please post the new rules to use on nginx with VBSEO 3.2?

    Thank you!

  8. #8
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    The same rewrite rules should work fine.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  9. #9
    Junior Member
    Real Name
    Tom
    Join Date
    Jan 2007
    Posts
    18
    Liked
    0 times
    ok perfect. I read that the .htaccess should be modified before upgrading vbseo to the latest version, so i thought that the same applyed for rewrite rules in nginx.

    Thank you!

  10. #10
    Member
    Real Name
    Bruce
    Join Date
    Aug 2008
    Location
    Riverstone, NSW, AUSTRALIA
    Posts
    64
    Liked
    0 times
    Sorry to drag up this old thread but I have just installed nginx as a proxy fro apache. Does this change go into the nginx vhost conf for my domain and then I remove .htaccess or do I out this IN .htaccess?

    Cheers
    Bruce

  11. #11
    Junior Member
    Real Name
    brian
    Join Date
    Oct 2009
    Location
    Sweet Home Alabama
    Posts
    28
    Liked
    0 times
    "/forums/" should be replaced with vB folder name.
    I made mine like so:

    Code:
    location /home/me_mine/public_html/ {
    
    rewrite ^/home/me_mine/public_html/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /home/me_mine/public_html/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last;
    
    if (!-e $request_filename) {
    rewrite ^/home/me_mine/public_html/(.*)$ /home/me_mine/public_html/vbseo.php last;
    }
    
    }
    
    if ($request_filename ~ "\.php$" ) {
    rewrite ^/home/me_mine/public_html/(.*)$ /home/me_mine/public_html/vbseo.php last;
    }
    My config file now looks like this:

    Code:
    server
    {
        listen      |SITE_IP|:80;
        server_name |DOMAIN_NAME| |DOMAIN_ALIASES|;
        # Main location
        location /
        {    
            proxy_pass         http://|SITE_IP|:|APACHE_PORT|;
            proxy_redirect     off;
        
            proxy_set_header   Host             $http_host;
            proxy_set_header   X-Real-IP        $remote_addr;
            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
            proxy_pass_header  Set-Cookie;
                
            |PROXY_REDIRECTS|
        }
        
        location /home/me_mine/public_html/ {
    
    rewrite ^/home/me_mine/public_html/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /home/me_mine/public_html/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last;
    
    if (!-e $request_filename) {
    rewrite ^/home/me_mine/public_html/(.*)$ /home/me_mine/public_html/vbseo.php last;
    }
    
    }
    
    if ($request_filename ~ "\.php$" ) {
    rewrite ^/home/me_mine/public_html/(.*)$ /home/me_mine/public_html/vbseo.php last;
    }
    
        # Static files location
        location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|bmp|rtf)$
        {
            root    |DOCROOT|;
            access_log /usr/local/apache/domlogs/|DOMAIN_NAME| main;
            access_log /usr/local/apache/domlogs/|DOMAIN_NAME|-bytes_log bytes_log;
            error_page 404 = @fallback;
        }
        location @fallback
        {
           proxy_pass http://|SITE_IP|:|APACHE_PORT|;
           proxy_redirect     off;
    
           proxy_set_header Host $host;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_pass_header  Set-Cookie;
    
           |PROXY_REDIRECTS|
        }
    }
    Is this the correct way to do this ?
    I am "not" getting any errors from nginx or httpd/apache.

    NOTE: Nginx server is only for static content, but this has resolved all my errors I was getting from my nginx logs it seems.

    Thanks Guy's,

  12. #12
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Hello,

    it looks ok.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  13. #13
    Member
    Real Name
    giorgino
    Join Date
    Jan 2010
    Posts
    73
    Liked
    5 times
    Quote Originally Posted by Oleg Ignatiuk View Post
    Here are rewrite rules to be used with vBSEO for nginx:
    Code:
    location /forums/ {
    
    rewrite ^/forums/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /forums/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last;
    
    if ($request_filename ~ "\.php$" ) {
    rewrite ^(.*)$ /forums/vbseo.php last;
    }
    
    if (!-e $request_filename) {
    rewrite ^/forums/(.*)$ /forums/vbseo.php last;
    }
    
    }
    "/forums/" should be replaced with vB folder name.

    Oleg where I have to put this code?

  14. #14
    vBSEO.com Webmaster Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    22,367
    Liked
    542 times
    Blog Entries
    4
    You need to put that code in your nginx.conf file , the file may have a different name according to your nginx configuration.
    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

  15. #15
    Junior Member
    Real Name
    stubbed
    Join Date
    Mar 2009
    Posts
    9
    Liked
    1 times
    IfIsEvil
    ^-- With that in mind, is there another way to achieve this?

    Something along the lines of this? I don't have vBSEO setup on my test rig just yet, will have to get that sorted.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. nginx
    By fras in forum General Discussion
    Replies: 3
    Last Post: 01-25-2008, 07:57 PM
  2. Using config_vbseo.php in different environments - HOWTO?
    By eliot in forum General Discussion
    Replies: 1
    Last Post: 03-29-2007, 04:13 PM
  3. Sitemap HowTo?
    By sixtyseven in forum Deutsch
    Replies: 14
    Last Post: 03-25-2006, 08:24 AM

Posting Permissions

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