Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80 default;
- server_name ~^(?:www\.)*(.+)$;
- set $HBW $1;
- server_name_in_redirect off;
- resolver 127.0.0.1;
- access_log /var/log/ispconfig/httpd/$host/access.log;
- root /var/www/$HBW/web;
- location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|flv|mp3)$ {
- access_log off;
- expires 30d;
- }
- location ~* ^.+\.(htm|html)$ {
- try_files $uri /index.php;
- access_log off;
- expires 30d;
- }
- location / {
- index index.html index.htm index.php;
- access_log off;
- proxy_pass http://$host:82;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- }
- location /phpmyadmin {
- root /usr/share/;
- index index.php index.html index.htm;
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- root /usr/share/;
- proxy_pass http://$host:82;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- }
- location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /usr/share/;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
- location /webmail {
- root /var/www/;
- index index.php index.html index.htm;
- location ~ ^/webmail/(.+\.php)$ {
- try_files $uri =404;
- root /war/www/webmail;
- proxy_pass http://127.0.0.1:82;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header Host 127.0.0.1:82/webmail;
- proxy_set_header X-Forwarded-For
- $proxy_add_x_forwarded_for;
- }
- location ~* ^/webmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
- root /var/www/webmail/webmail;
- }
- }
- location /WebMail {
- rewrite ^/* $host:82/webmail last;
- }
- location ^~ /awstats-icon {
- alias /usr/share/awstats/icon/;
- access_log off;
- }
- location ^~ /awstatscss {
- alias /usr/share/doc/awstats/examples/css/;
- access_log off;
- }
- location ^~ /awstatsclasses {
- alias /usr/share/doc/awstats/examples/classes/;
- access_log off;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement