SHARE
TWEET

Untitled

a guest Apr 21st, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2.         listen 80 default_server;
  3.         listen [::]:80 default_server ipv6only=on;
  4.  
  5.         root /var/www/html;
  6.         index index.php index.html index.htm index.nginx-debian.html;
  7.  
  8.         server_name 35.164.97.74;
  9.  
  10.         location / {
  11.             try_files $uri $uri/ =404;
  12.         }
  13.  
  14.         error_page 404 /404.html;
  15.         error_page 500 502 503 504 /50x.html;
  16.         location = /50x.html {
  17.             root /var/www/html;
  18.         }
  19.  
  20.         location ~ .php$ {
  21.             try_files $uri =404;
  22.             fastcgi_split_path_info ^(.+.php)(/.+)$;
  23.             fastcgi_pass unix:/var/run/php5.6-fpm.sock;
  24.             fastcgi_index index.php;
  25.             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  26.     #        fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
  27.             include fastcgi_params;
  28.         }
  29.     }
  30.    
  31. server {
  32.         listen          80;
  33.         server_name     xxxxxxxxxxxxxxxxxxxxxxxxxxx;
  34.         root           /var/www/html/livehelperchat;
  35.         location ~* (^(?!(?:(?!(php)).)*/(albums|bin|var|lib|cache|doc|settings|pos|modules)/).*?(index.php|upgrade.php)$) {
  36.             include        /etc/nginx/livehelperchat_fastcgi_params;
  37.             fastcgi_pass   unix:/var/run/php5.6-fpm.sock;
  38.  
  39.             fastcgi_index  index.php;
  40.             fastcgi_param  PATH_INFO  $query_string;
  41.            # fastcgi_param  SCRIPT_FILENAME /var/livehelperchat/$fastcgi_script_name;
  42.              fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  43.         }
  44.         #Allow hotlinking to normal and thumb size images
  45.         location ~* (normal_|thumb_|^/design|^/cache|^/var/storagetheme)(.*).(gif|jpe?g?|png|mp3|svg|otf|woff|eot|ttf|ogg|wav|bmp|htm|swf|css|js|swf|pdf|ico)$ {
  46.             ## @todo: add expires headers...
  47.             # favicon is only stored in 1 dir, the design one; But browsers ask for it in the root
  48.             if ($http_user_agent ~* "(WebReaper|wget|SiteSucker|SuperBot|Mihov Picture Downloader|TALWinHttpClient|A1 Website Download|WebCopier|Download Ninja|Microsoft URL Control|GetRight|Arachmo|MJ12bot|Gaisbot|Anonymous|Yanga|Twiceler|psbot|Irvine|Indy Library|HTTrack)" ) {
  49.                 return 403;
  50.             }
  51.             if ($http_referer ~* (stockingteensex.info|cbox.ws|teensos.net|dpstream.net|tagged.com|kaskus.us|gorilladatingservice.info|taringa.net|discuss.com|craigslist.org|poringa.net)) {
  52.                 return 403;
  53.             }
  54.             #sendfile off;
  55.             #aio on;
  56.             directio 512;
  57.             expires max;
  58.             access_log off;
  59.              root           /var/www/html/livehelperchat;
  60.         }
  61.         # Do not allow to hotlink full size images except our self and major search engines
  62.         location ~* .(gif|jpe?g?|png|bmp|swf|css|js|svg|otf|eot|ttf|woff|swf|mp3|ogg|wav|pdf|ico|txt)$ {
  63.             ## @todo: add expires headers...
  64.             valid_referers none blocked server_names ~(livehelperchat.com|google.|reddit.|bing.|yahoo.);
  65.             if ($invalid_referer) {
  66.                 return 403;
  67.             }
  68.             if ($http_user_agent ~* "(WebReaper|wget|SiteSucker|SuperBot|Mihov Picture Downloader|TALWinHttpClient|A1 Website Download|WebCopier|Download Ninja|Microsoft URL Control|GetRight|Arachmo|MJ12bot|Gaisbot|Anonymous|Yanga|Twiceler|psbot|Irvine|Indy Library|HTTrack)" ) {
  69.                 return 403;
  70.             }
  71.             if ($http_referer ~* (stockingteensex.info|cbox.ws|teensos.net|dpstream.net|tagged.com|kaskus.us|gorilladatingservice.info|taringa.net|discuss.com|craigslist.org|poringa.net)) {
  72.                 return 403;
  73.             }
  74.             #sendfile off;
  75.             #aio on;
  76.             directio 512;
  77.             expires max;
  78.              root           /var/www/html/livehelperchat;
  79.         }
  80.         location / {
  81.             rewrite "^(.*)$" "/index.php?$1" last;
  82.         }
  83.     }
  84.    
  85. nginx: [emerg] could not build referer_hash, you should increase referer_hash_bucket_size: 64
  86. nginx: configuration file /etc/nginx/nginx.conf test failed
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top