sendy.tpl 2.4 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. include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
  10. location = /favicon.ico {
  11. log_not_found off;
  12. access_log off;
  13. }
  14. location = /robots.txt {
  15. allow all;
  16. log_not_found off;
  17. access_log off;
  18. }
  19. location ~* "/\.(htaccess|htpasswd|git|svn|DS_Store)$" {
  20. deny all;
  21. }
  22. location ~ /(readme.html|license.txt) {
  23. deny all;
  24. }
  25. if (!-f $request_filename){
  26. rewrite ^/([a-zA-Z0-9-]+)$ /$1.php last;
  27. }
  28. location / {
  29. try_files $uri $uri/ /index.php?$args;
  30. 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)$ {
  31. expires 1d;
  32. }
  33. location ~ [^/]\.php(/|$) {
  34. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  35. try_files $uri =404;
  36. fastcgi_pass %backend_lsnr%;
  37. fastcgi_index index.php;
  38. include /etc/nginx/fastcgi_params;
  39. }
  40. location /l/ {
  41. rewrite ^/l/([a-zA-Z0-9/]+)$ /l.php?i=$1 last;
  42. }
  43. location /t/ {
  44. rewrite ^/t/([a-zA-Z0-9/]+)$ /t.php?i=$1 last;
  45. }
  46. location /w/ {
  47. rewrite ^/w/([a-zA-Z0-9/]+)$ /w.php?i=$1 last;
  48. }
  49. location /unsubscribe/ {
  50. rewrite ^/unsubscribe/(.*)$ /unsubscribe.php?i=$1 last;
  51. }
  52. location /subscribe/ {
  53. rewrite ^/subscribe/(.*)$ /subscribe.php?i=$1 last;
  54. }
  55. }
  56. error_page 403 /error/404.html;
  57. error_page 404 /error/404.html;
  58. error_page 500 502 503 504 /error/50x.html;
  59. location /error/ {
  60. alias %home%/%user%/web/%domain%/document_errors/;
  61. }
  62. location /vstats/ {
  63. alias %home%/%user%/web/%domain%/stats/;
  64. include %home%/%user%/web/%domain%/stats/auth.conf*;
  65. }
  66. include /etc/nginx/conf.d/phpmyadmin.inc*;
  67. include /etc/nginx/conf.d/phppgadmin.inc*;
  68. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  69. }