Advertisement
vovansystems

nginx (0.7.67) conf for shambler81

Jan 12th, 2013
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. server {
  2. listen 80 default;
  3. server_name ~^(?:www\.)*(.+)$;
  4. set $HBW $1;
  5. server_name_in_redirect off;
  6. resolver 127.0.0.1;
  7. access_log /var/log/ispconfig/httpd/$host/access.log;
  8. root /var/www/$HBW/web;
  9.  
  10. 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)$ {
  11. access_log off;
  12. expires 30d;
  13. }
  14.  
  15. location ~* ^.+\.(htm|html)$ {
  16. try_files $uri /index.php;
  17. access_log off;
  18. expires 30d;
  19. }
  20.  
  21. location / {
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement