datascraperr

Untitled

Dec 18th, 2018
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.07 KB | None | 0 0
  1. server {
  2.     listen      77.77.77.77:80;
  3.     server_name domaincom *.domaincom;
  4.  
  5.     root /home/admin/web/domaincom/public_html/subs/$subdomain;
  6.     set $subdomain "";
  7.     if ($host ~* ^([a-z0-9-\.]+)\.domaincom$) {
  8.         set $subdomain $1;
  9.         #rewrite $request_uri $1.$request_uri;
  10.         #rewrite ^(.*txt)$ $subdomain.$request_uri;   just testing here
  11.     #rewrite ^(.*\.txt)$ $subdomain.$request_uri/$1;
  12.    
  13.     }
  14.     if ($host ~* ^www.domaincom$) {
  15.         set $subdomain "";
  16.     }
  17.    
  18.      # location $subdomain {
  19.         # # # An example rewrite
  20.         # rewrite ^/(.*txt)$ $request_uri;
  21.     # }
  22.    
  23.     index       index.php;
  24.     access_log  off;
  25.     error_log /dev/null;
  26.    
  27.  
  28.     location / {
  29.    
  30.     root        /home/admin/web/domaincom/public_html;
  31.         location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  32.             expires     max;
  33.         }
  34.  
  35.         location ~ [^/]\.php(/|$) {
  36.             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  37.             if (!-f $document_root$fastcgi_script_name) {
  38.                 return  404;
  39.             }
  40.  
  41.             fastcgi_pass    127.0.0.1:9002;
  42.             fastcgi_index   index.php;
  43.             include         /etc/nginx/fastcgi_params;
  44.         }
  45.     }
  46.  
  47.     error_page  403 /error/404.html;
  48.     error_page 404 = @foobar;
  49.  
  50. location @foobar {
  51.   return 301 /;
  52. }
  53.     error_page  500 502 503 504 /error/50x.html;
  54.  
  55.     location /error/ {
  56.         alias   /home/admin/web/domaincom/document_errors/;
  57.     }
  58.    
  59.                     # Access deny for bots
  60.     # See bots list in the /etc/nginx/nginx.conf
  61.     if ($limit_bots = 1) {
  62.               return 403;
  63.         }
  64.    
  65.  
  66.     location ~* "/\.(htaccess|htpasswd)$" {
  67.         deny    all;
  68.         return  404;
  69.     }
  70.  
  71.     location /vstats/ {
  72.         alias   /home/admin/web/domaincom/stats/;
  73.         include /home/admin/conf/web/domaincom.auth*;
  74.     }
  75.  
  76.     include     /etc/nginx/conf.d/phpmyadmin.inc*;
  77.     include     /etc/nginx/conf.d/phppgadmin.inc*;
  78.     include     /etc/nginx/conf.d/webmail.inc*;
  79.  
  80.     include     /home/admin/conf/web/nginx.domaincom.conf*;
  81. }
Add Comment
Please, Sign In to add comment