Results 1 to 2 of 2

NGINX rules for forum in subfolder of site

This is a discussion on NGINX rules for forum in subfolder of site within the General Discussion forums, part of the vBSEO SEO Plugin category; I have my blog (wordpress) set up in the /var/www folder with it's own NGINX Virtual Host writes but I ...

  1. #1
    Junior Member
    Real Name
    Bradley
    Join Date
    Apr 2010
    Posts
    18
    Liked
    0 times

    NGINX rules for forum in subfolder of site

    I have my blog (wordpress) set up in the /var/www folder with it's own NGINX Virtual Host writes but I need to get the writes set up for the forum in /var/www/forums. What do I need to add exactly the the sheet. The layout is www.site.com for the main blog and www.site.com/forums for the blog, so it would just be modifying the current Virtual Host file.

    Code:
    server {
        listen   80;
        server_name  localhost;
        access_log  /var/log/nginx/localhost.access.log;
    
    ## Default location
        location / {
            root   /var/www;
            index  index.php;
        }
    
    ## Images and static content is treated different
        location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
          access_log        off;
          expires           30d;
          root /var/www;
        }
    
    ## Parse all .php file in the /var/www directory
        location ~ .php$ {
            fastcgi_split_path_info ^(.+\.php)(.*)$;
            fastcgi_pass   backend;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /var/www$fastcgi_script_name;
            include fastcgi_params;
            fastcgi_param  QUERY_STRING     $query_string;
            fastcgi_param  REQUEST_METHOD   $request_method;
            fastcgi_param  CONTENT_TYPE     $content_type;
            fastcgi_param  CONTENT_LENGTH   $content_length;
            fastcgi_intercept_errors        on;
            fastcgi_ignore_client_abort     off;
            fastcgi_connect_timeout 60;
            fastcgi_send_timeout 180;
            fastcgi_read_timeout 180;
            fastcgi_buffer_size 128k;
            fastcgi_buffers 4 256k;
            fastcgi_busy_buffers_size 256k;
            fastcgi_temp_file_write_size 256k;
        }
    
    ## Disable viewing .htaccess & .htpassword
        location ~ /\.ht {
            deny  all;
        }
    }
    upstream backend {
            server 127.0.0.1:9000;
    }

  2. #2
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    Please don't double post.
    rewrite rules on nginx in sub folder

Similar Threads

  1. rewrite rules on nginx in sub folder
    By bradleyw in forum General Discussion
    Replies: 20
    Last Post: 09-18-2010, 03:18 AM
  2. Nginx rules don't redirect old showthread.php URLs
    By Inettive in forum General Discussion
    Replies: 4
    Last Post: 01-10-2010, 03:19 AM
  3. baseball schedules in forum subfolder
    By msimonds in forum Custom Rewrite Rules
    Replies: 7
    Last Post: 01-17-2006, 05:34 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
  •