sendy.stpl 2.4 KB

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