SHOW:
|
|
- or go back to the newest paste.
1 | server { | |
2 | - | listen 80 default; |
2 | + | listen 80 default_server; |
3 | server_name ~^(?:www\.)*(?<HBW>.+)$; | |
4 | server_name_in_redirect off; | |
5 | resolver 127.0.0.1; | |
6 | access_log /var/log/ispconfig/httpd/$host/access.log; | |
7 | root /var/www/$HBW/web; | |
8 | ||
9 | 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)$ { | |
10 | access_log off; | |
11 | expires 30d; | |
12 | } | |
13 | ||
14 | location ~* ^.+\.(htm|html)$ { | |
15 | try_files $uri /index.php; | |
16 | access_log off; | |
17 | expires 30d; | |
18 | } | |
19 | ||
20 | location / { | |
21 | root /var/www/$HBW/web; | |
22 | index index.html index.htm index.php; | |
23 | access_log off; | |
24 | proxy_pass http://$host:82; | |
25 | proxy_set_header X-Real-IP $remote_addr; | |
26 | proxy_set_header Host $host; | |
27 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
28 | } | |
29 | ||
30 | location /phpmyadmin { | |
31 | root /usr/share/; | |
32 | index index.php index.html index.htm; | |
33 | location ~ ^/phpmyadmin/(.+\.php)$ { | |
34 | try_files $uri =404; | |
35 | root /usr/share/; | |
36 | proxy_pass http://$host:82; | |
37 | proxy_set_header X-Real-IP $remote_addr; | |
38 | proxy_set_header Host $host; | |
39 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
40 | } | |
41 | location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { | |
42 | root /usr/share/; | |
43 | } | |
44 | } | |
45 | location /phpMyAdmin { | |
46 | rewrite ^/* /phpmyadmin last; | |
47 | } | |
48 | ||
49 | ||
50 | location /webmail { | |
51 | root /var/www/; | |
52 | index index.php index.html index.htm; | |
53 | location ~ ^/webmail/(.+\.php)$ { | |
54 | try_files $uri =404; | |
55 | root /war/www/webmail; | |
56 | ||
57 | proxy_pass http://127.0.0.1:82; | |
58 | proxy_set_header X-Real-IP $remote_addr; | |
59 | proxy_set_header Host 127.0.0.1:82/webmail; | |
60 | proxy_set_header X-Forwarded-For | |
61 | $proxy_add_x_forwarded_for; | |
62 | } | |
63 | location ~* ^/webmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { | |
64 | root /var/www/webmail/webmail; | |
65 | } | |
66 | } | |
67 | location /WebMail { | |
68 | rewrite ^/* $host:82/webmail last; | |
69 | } | |
70 | ||
71 | location ^~ /awstats-icon { | |
72 | alias /usr/share/awstats/icon/; | |
73 | access_log off; | |
74 | } | |
75 | location ^~ /awstatscss { | |
76 | alias /usr/share/doc/awstats/examples/css/; | |
77 | access_log off; | |
78 | } | |
79 | location ^~ /awstatsclasses { | |
80 | alias /usr/share/doc/awstats/examples/classes/; | |
81 | access_log off; | |
82 | } | |
83 | } |