sendy.tpl 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. server {
  2. listen %ip%:%web_port%;
  3. server_name %domain_idn% %alias_idn%;
  4. root %docroot%;
  5. index index.php index.html index.htm;
  6. access_log /var/log/nginx/domains/%domain%.log combined;
  7. access_log /var/log/nginx/domains/%domain%.bytes bytes;
  8. error_log /var/log/nginx/domains/%domain%.error.log error;
  9. location = /favicon.ico {
  10. log_not_found off;
  11. access_log off;
  12. }
  13. location = /robots.txt {
  14. allow all;
  15. log_not_found off;
  16. access_log off;
  17. }
  18. location ~* "/\.(htaccess|htpasswd|git|svn|DS_Store)$" {
  19. deny all;
  20. }
  21. location ~ /(readme.html|license.txt) {
  22. deny all;
  23. }
  24. if (!-f $request_filename){
  25. rewrite ^/([a-zA-Z0-9-]+)$ /$1.php last;
  26. }
  27. location / {
  28. try_files $uri $uri/ /index.php?$args;
  29. location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar|pdf)$ {
  30. expires 1d;
  31. }
  32. location ~ [^/]\.php(/|$) {
  33. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  34. try_files $uri =404;
  35. fastcgi_pass %backend_lsnr%;
  36. fastcgi_index index.php;
  37. include /etc/nginx/fastcgi_params;
  38. }
  39. location /l/ {
  40. rewrite ^/l/([a-zA-Z0-9/]+)$ /l.php?i=$1 last;
  41. }
  42. location /t/ {
  43. rewrite ^/t/([a-zA-Z0-9/]+)$ /t.php?i=$1 last;
  44. }
  45. location /w/ {
  46. rewrite ^/w/([a-zA-Z0-9/]+)$ /w.php?i=$1 last;
  47. }
  48. location /unsubscribe/ {
  49. rewrite ^/unsubscribe/(.*)$ /unsubscribe.php?i=$1 last;
  50. }
  51. location /subscribe/ {
  52. rewrite ^/subscribe/(.*)$ /subscribe.php?i=$1 last;
  53. }
  54. }
  55. error_page 403 /error/404.html;
  56. error_page 404 /error/404.html;
  57. error_page 500 502 503 504 /error/50x.html;
  58. location /error/ {
  59. alias %home%/%user%/web/%domain%/document_errors/;
  60. }
  61. location /vstats/ {
  62. alias %home%/%user%/web/%domain%/stats/;
  63. include %home%/%user%/web/%domain%/stats/auth.conf*;
  64. }
  65. include /etc/nginx/conf.d/phpmyadmin.inc*;
  66. include /etc/nginx/conf.d/phppgadmin.inc*;
  67. include /etc/nginx/conf.d/webmail.inc*;
  68. include %home%/%user%/conf/web/nginx.%domain%.conf*;
  69. }