I need some help with nginx rewrite rules. I've read through the various threads, and have tried various combinations of rewrite rules and can't seem to get any to work. Problems are missing css/jscript files and the wrong pages served up when clicking on links.
Any help greatly appreciated.
URL: Cable Forum Test Site - Powered by vBulletin
Version: vBSEO 3.1.0
nginx conf file:
vhost conf file:Code:user apache apache; worker_processes 2; worker_rlimit_nofile 10240; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] $request ' '"$status" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; error_log logs/error.log debug; sendfile on; tcp_nopush on; gzip on; gzip_min_length 1100; gzip_buffers 16 8k; gzip_http_version 1.0; gzip_comp_level 1; gzip_proxied any; gzip_types text/plain text/css text/javascript text/xml application/x-javascript application/xml application/xml+rss; include /usr/local/nginx/conf/vhosts/*.conf; }
Code:server { listen 81; server_name cableforum.info www.cableforum.info; #access_log logs/cableforum.info.access.log main; error_log logs/cableforum.info.error.log debug; client_header_buffer_size 8k; client_body_buffer_size 256k; client_max_body_size 10M; keepalive_timeout 2 2; #error_page 404 = /error/404.html; error_page 502 503 504 = /error/50x_error.html; location /error/50x_error.html { internal; } root /var/www/vhosts/cableforum.info/httpdocs; index index.php index.html index.htm; # Proxy to FCGI location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_intercept_errors on; break; } # Expire Header for Images location ~* ^.+.(jpg|jpeg|gif|png|ico)$ { root /var/www/vhosts/cableforum.info/httpdocs; access_log off; expires 30d; break; } # vBSeo - Start location /board/ { rewrite ^/board/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /board/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last; if (!-e $request_filename) { rewrite ^(/board/.*)$ /board/vbseo.php last; } } if ($request_filename ~ "\.php$" ) { rewrite ^(.*(admincp/|modcp/|vbseocp\.php).*) $1 last; rewrite ^/board/(.*)$ /board/vbseo.php last; } # vBSeo - End }


LinkBack URL
About LinkBacks





Reply With Quote