September 16, 2010 09:01PM
Hey guys,
Ok currently I have a blog and forum set up in this structure:

www.site.com > blog (Wordpress)
www.site.com/forums > forums (vBulletin)

However I wanted to use VBSEO with my forum, but it requires some virtual host rewrites. This is my current virtual host file
[quote]server {
listen 80;
server_name site.com www.site.com;
access_log /var/log/nginx/localhost.access.log;

## Force WWW
if ($host ~* ^site\.com) {
rewrite ^(.*)$ http://www.site.com$1 permanent;
}


## Default location
location / {
root /var/www;
index index.php;

## this sends all non-existing file or directory requests to index.php
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php?q=$1 last;
}
}

## 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;
}[/quote]

this is what vbseo gives to nginx customers to use
[quote]
location /forums/ {

rewrite ^/forums/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /forums/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last;

if (!-e $request_filename) {
rewrite ^/forums/(.*)$ /forums/vbseo.php last;
}

}

if ($request_filename ~ "\.php$" ) {
rewrite ^/forums/(.*)$ /forums/vbseo.php last;
}[/quote]

where exactly am I sticking that bit of code into my current virtual host? DO I need to modify it as well to reflect the structure of my site?
Subject Author Posted

Wordpress/vBulletin/VBSEO rewrites

bradleyw September 16, 2010 09:01PM

Re: Wordpress/vBulletin/VBSEO rewrites

Splitice September 17, 2010 01:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 282
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready