sendy.stpl 2.7 KB

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