Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server
- {
- listen *:80;
- listen *:443;
- server_name softairmania.it ww.softairmania.it w.softairmania.it wwww.softairmania.it samweb1.softairmania.it samweb2.softairmania.it;
- return 301 $scheme://www.softairmania.it$request_uri;
- }
- server
- {
- set $root_sito /home/web/htdocs/softairmania.it/public_html;
- root $root_sito;
- listen *:80;
- listen *:443;
- server_name www.softairmania.it;
- ssl_certificate /usr/local/etc/letsencrypt/live/softairmania.it/fullchain.pem;
- ssl_certificate_key /usr/local/etc/letsencrypt/live/softairmania.it/privkey.pem;
- access_log /home/serverweb/log/nginx/softairmania.it/www-access.log rt_cache;
- error_log /home/serverweb/log/nginx/softairmania.it/www-error.log notice;
- # set $skip_cache 0;
- # POST requests and urls with a query string should always go to PHP
- # if ($request_method = POST) {
- # set $skip_cache 1;
- # }
- # if ($query_string != "") {
- # set $skip_cache 1;
- # }
- # Don't cache uris containing the following segments
- # if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
- # set $skip_cache 1;
- # }
- # Don't use the cache for logged in users or recent commenters
- # if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
- # set $skip_cache 1;
- # }
- # Don't cache shopping basket, checkout or account pages
- # if ($request_uri ~* "/cart/*$|/checkout/*$|/my-account/*$") {
- # set $skip_cache 1;
- # }
- # Don't cache shopping basket, checkout or account pages
- # if ($request_uri ~* "/admin-cp/*|/mod-cp/*|") {
- # set $skip_cache 1;
- # }
- location ~ /.well-known {
- allow all;
- }
- location ~ /\. { deny all; }
- index index.php index.html index.htm;
- # include /home/serverweb/etc/nginx/_conf/awstats.conf;
- include /home/serverweb/etc/nginx/_conf/php.conf;
- set $wp_subdir "/portale";
- rewrite /wp-admin$ $scheme://$host$uri/ permanent;
- rewrite ^/(sitemap|portale/sitemap)(-+([a-zA-Z0-9_-]+))?\.xml$ "/portale/index.php?xml_sitemap=params=$3" last;
- rewrite ^/(sitemap|portale/sitemap)(-+([a-zA-Z0-9_-]+))?\.xml\.gz$ "/portale/index.php?xml_sitemap=params=$3;zip=true" last;
- rewrite ^/(sitemap|portale/sitemap)(-+([a-zA-Z0-9_-]+))?\.html$ "/portale/index.php?xml_sitemap=params=$3;html=true" last;
- rewrite ^/(sitemap|portale/sitemap)(-+([a-zA-Z0-9_-]+))?\.html.gz$ "/portale/index.php?xml_sitemap=params=$3;html=true;zip=true" last;
- rewrite ^/(portale/useronline|content|content/)$ "/portale/" redirect;
- rewrite ^/shop/(.*) "/portale/negozio/" redirect;
- location ~* \.(bmp|bz2|css|doc|exe|gz|htm|html|htmls|js|mid|midi|pdf|ppt|rar|rtf|tar|tgz|txt|wav|xls|xml|zip)$
- {
- rewrite ^/archive/index.php/t-([0-9]+)\.html /archive/index.php?t-$1.html last;
- rewrite ^/archive/index.php/f-([0-9]+)\.html /archive/index.php?f-$1.html last;
- rewrite ^/(forums|entries|threads|members|forums|blogs|list|content|widget)/clientscript/(.*) /clientscript/$2 last;
- expires 3m;
- }
- location ~* \.(jpg|jpeg|gif|png|ico)$
- {
- rewrite_log off;
- error_log /home/serverweb/log/nginx/softairmania.it/image-error.log error;
- rewrite ^/(forums|entries|threads|members|forums|blogs|list|content|widget)(.*)/images/(.*) /images/$3 last;
- rewrite ^/(forums|entries|threads|members|forums|blogs|list|content|widget)(.*)/customavatars/(.*) /customavatars/$2 last;
- rewrite ^/(forums|entries|threads|members|forums|blogs|list|content|widget)(.*)/signaturepics/(.*) /signaturepics/$2 last;
- # rewrite ^/(forums|entries|threads|members|forums|blogs|list|content|widget)/images/(.*) /images/$2 last;
- # rewrite ^/(forums|entries|threads|members|forums|blogs|list|content|widget)/customavatars/(.*) /customavatars/$2 last;
- # rewrite ^/(forums|entries|threads|members|forums|blogs|list|content|widget)/signaturepics/(.*) /signaturepics/$2 last;
- expires 3m;
- error_page 404 /not-found.png;
- }
- location ~* /portale
- {
- access_log /home/serverweb/log/nginx/softairmania.it/portale-access.log;
- error_log /home/serverweb/log/nginx/softairmania.it/portale-error.log error;
- try_files $uri $uri/ /portale/index.php?q=$uri&$args;
- }
- location /
- {
- # access_log /home/serverweb/log/nginx/softairmania.it/www-access.log;
- # error_log /home/serverweb/log/nginx/softairmania.it/www-error.log error;
- rewrite ^/forum/threads/.* /showthread.php?t=$1&p=$2&$query_string last;
- rewrite ^/threads/.* /showthread.php?t=$1&p=$2&$query_string last;
- rewrite ^/forums/.* /forumdisplay.php?$query_string last;
- rewrite ^/members/.* /member.php?u=$1&$query_string last;
- rewrite ^/blogs/.* /blog.php?u=$1&p=$2&$query_string last;
- rewrite ^/entries/.* /entry.php?b=$1&p=$2&$query_string last;
- # CMS vb disabilitato
- # rewrite ^/list/.* /list.php?r=$1$2&$query_string last;
- # rewrite ^/content/.* /content.php?r=$1&$query_string last;
- # rewrite ^/widget/.* /widget.php?r=config/$1&$query_string last;
- rewrite ^/regolamenti /misc.php?do=vsarules last;
- rewrite ^/regolamento_generale /misc.php?do=vsarules&cfrset=1 last;
- rewrite ^/netiquette /misc.php?do=vsarules&cfrset=2 last;
- rewrite ^/regolamento_del_mercatino /misc.php?do=vsarules&cfrset=3 last;
- rewrite ^/regolamento_tornei_ed_eventi /misc.php?do=vsarules&cfrset=5 last;
- rewrite ^/faq_del_mercatino /misc.php?do=vsarules&cfrset=6 last;
- rewrite ^/staff /showgroups.php last;
- rewrite ^/viewtopic.php(.*) /showthread.php?$query_string last;
- rewrite ^/forum/forumdisplay.php(.*) /forumdisplay.php?$query_string last;
- rewrite ^/forum/showthread.php(.*) /showthread.php?$query_string last;
- rewrite ^/showthreadthread.php(.*) /showthread.php?$query_string last;
- #viewtopic.php http://www.softairmania.it/viewtopic.php?t=40029&sid=f5444dee70c745faa95d18bf5ec78ca7
- #forumdisplay.php http://www.softairmania.it/forum/forumdisplay.php?f=166
- rewrite ^/(forums|forum|forum/)$ /forum.php last;
- # rewrite ^/sitemap\.(.*) /xmlsitemap.php?$query_string last;
- rewrite ^/SAM-Wiki/([^?]*)(?:\?(.*))? /samwiki/index.php?title=$1&$args last;
- try_files $uri $uri/portale /portale/index.php?q=$request_uri;
- }
- # error_page 500 502 503 504 /50x.html;
- # location = /50x.html
- # {
- # root /home/serverweb/etc/nginx/_conf/error-page/;
- # }
- location = /not-found.png
- {
- root /home/serverweb/etc/nginx/_conf/error-page/;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment