Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 8069;
- server_name www.dominio.com;
- root /var/www/www.dominio.com/web;
- index index.php index.html;
- error_log /var/log/ispconfig/httpd/www.dominio.com/error.log;
- access_log /var/log/ispconfig/httpd/www.dominio.com/access.log combined;
- if ($http_host != "www.dominio.com") {
- rewrite ^ http://www.dominio.com$request_uri permanent;
- }
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- #----------------- vBulletin - VBSEO ---------------------
- location /forum/ {
- rewrite ^/forum/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /forum/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last;
- try_files $uri $uri/ /forum/vbseo.php?$args;
- }
- location ~ /forum/(.*\.php)$ {
- rewrite ^/forum/(.*)$ /forum/vbseo.php last;
- }
- location /forum/vbseo/(includes|resources/html|resources/xml)/ {
- allow 127.0.0.1;
- deny all;
- }
- # --------------- WORDPRESS -----------------
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location / {
- try_files $uri $uri/ /index.php?$args;
- gzip on;
- gzip_http_version 1.0;
- gzip_vary on;
- gzip_comp_level 3;
- gzip_proxied any;
- gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
- gzip_buffers 16 8k;
- }
- # Add trailing slash to */wp-admin requests.
- rewrite /wp-admin$ $scheme://$host$uri/ permanent;
- location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php$ {
- include /etc/nginx/fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
- # if the requested file exists, return it immediately
- if (-f $request_filename) {
- break;
- }
- # --------------- W3 TOTAL CACHE -----------------
- ## W3 Total CACHE BEGIN
- set $totalcache_file '';
- set $totalcache_uri $request_uri;
- if ($request_method = POST) {
- set $totalcache_uri '';
- }
- # Using pretty permalinks, so bypass the cache for any query string
- if ($query_string) {
- set $totalcache_uri '';
- }
- if ($http_cookie ~* "comment_author_|wordpress|wp-postpass_" ) {
- set $totalcache_uri '';
- }
- # if we haven't bypassed the cache, specify our totalcache file
- if ($totalcache_uri ~ ^(.+)$) {
- set $totalcache_file /wp-content/w3tc-$http_host/pgcache/$1/_default_.html;
- }
- # only rewrite to the totalcache file if it actually exists
- if (-f $document_root$totalcache_file) {
- rewrite ^(.*)$ $totalcache_file break;
- }
- ##W3 Total CACHE END
- # all other requests go to WordPress
- if (!-e $request_filename) {
- rewrite . /index.php last;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement