Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- server_name 5.101.116.233 www.5.101.116.233;
- listen 5.101.116.233;
- disable_symlinks if_not_owner from=$root_path;
- set $root_path /var/www/test/data/www/5.101.116.233;
- location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
- root $root_path;
- access_log /var/www/nginx-logs/test isp;
- access_log /var/www/httpd-logs/5.101.116.233.access.log ;
- error_page 404 = @fallback;
- }
- location / {
- proxy_pass http://5.101.116.233:81;
- proxy_redirect http://5.101.116.233:81/ /;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Real-IP $remote_addr;
- }
- location ~* ^/(webstat|awstats|webmail|myadmin|pgadmin)/ {
- proxy_pass http://5.101.116.233:81;
- proxy_redirect http://5.101.116.233:81/ /;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Real-IP $remote_addr;
- }
- location @fallback {
- proxy_pass http://5.101.116.233:81;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Real-IP $remote_addr;
- }
- location ^~ /webstat/ {
- auth_basic "Restricted area";
- auth_basic_user_file /var/www/test/data/etc/2885739.passwd;
- try_files $uri @fallback;
- }
- include /usr/local/ispmgr/etc/nginx.inc;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement