Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.52 KB | None | 0 0
  1.     server {
  2.         server_name 5.101.116.233 www.5.101.116.233;
  3.         listen 5.101.116.233;
  4.         disable_symlinks if_not_owner from=$root_path;
  5.         set $root_path /var/www/test/data/www/5.101.116.233;
  6.         location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
  7.             root $root_path;
  8.             access_log /var/www/nginx-logs/test isp;
  9.             access_log /var/www/httpd-logs/5.101.116.233.access.log ;
  10.             error_page 404 = @fallback;
  11.         }
  12.         location / {
  13.             proxy_pass http://5.101.116.233:81;
  14.             proxy_redirect http://5.101.116.233:81/ /;
  15.             proxy_set_header Host $host;
  16.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  17.             proxy_set_header X-Forwarded-Proto $scheme;
  18.             proxy_set_header X-Real-IP $remote_addr;
  19.         }
  20.         location ~* ^/(webstat|awstats|webmail|myadmin|pgadmin)/ {
  21.             proxy_pass http://5.101.116.233:81;
  22.             proxy_redirect http://5.101.116.233:81/ /;
  23.             proxy_set_header Host $host;
  24.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  25.             proxy_set_header X-Forwarded-Proto $scheme;
  26.             proxy_set_header X-Real-IP $remote_addr;
  27.         }
  28.         location @fallback {
  29.             proxy_pass http://5.101.116.233:81;
  30.             proxy_set_header Host $host;
  31.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  32.             proxy_set_header X-Forwarded-Proto $scheme;
  33.             proxy_set_header X-Real-IP $remote_addr;
  34.         }
  35.         location ^~ /webstat/ {
  36.             auth_basic "Restricted area";
  37.             auth_basic_user_file /var/www/test/data/etc/2885739.passwd;
  38.             try_files $uri @fallback;
  39.         }
  40.         include /usr/local/ispmgr/etc/nginx.inc;
  41.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement