1. server {
  2. listen 80;
  3. # access_log off;
  4. access_log /home/mail.intietkiem.com/logs/access.log;
  5. # error_log off;
  6. error_log /home/mail.intietkiem.com/logs/error.log;
  7. root /home/mail.intietkiem.com/public_html;
  8. index index.php index.html index.htm;
  9. server_name mail.intietkiem.com;
  10. #sendy
  11. location ~ /(l|t|w|(un)?subscribe)/ {
  12. rewrite ^/([^/]+)/([a-zA-Z0-9/]+)$ /$1.php?i=$2 last;
  13. }
  14. location / {
  15. rewrite ^/([a-zA-Z0-9\-]+) /$1.php?$args last;
  16. }
  17. #het sendy
  18. location / {
  19. try_files $uri $uri/ /index.php?$args;
  20. }
  21. # Custom configuration
  22. include /home/mail.intietkiem.com/public_html/*.conf;
  23. location ~ \.php$ {
  24. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  25. include /etc/nginx/fastcgi_params;
  26. fastcgi_pass 127.0.0.1:9000;
  27. fastcgi_index index.php;
  28. fastcgi_connect_timeout 300;
  29. fastcgi_send_timeout 300;
  30. fastcgi_read_timeout 300;
  31. fastcgi_buffer_size 32k;
  32. fastcgi_buffers 8 16k;
  33. fastcgi_busy_buffers_size 32k;
  34. fastcgi_temp_file_write_size 32k;
  35. fastcgi_intercept_errors on;
  36. fastcgi_param SCRIPT_FILENAME /home/mail.intietkiem.com/public_html$fastcgi_script_name;
  37. }
  38. # Disable .htaccess and other hidden files
  39. location ~ /\.(?!well-known).* {
  40. deny all;
  41. access_log off;
  42. log_not_found off;
  43. }
  44. location = /favicon.ico {
  45. log_not_found off;
  46. access_log off;
  47. }
  48. location = /robots.txt {
  49. allow all;
  50. log_not_found off;
  51. access_log off;
  52. }
  53. location ~* \.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|eot|svg|ttf|woff)$ {
  54. gzip_static off;
  55. add_header Pragma public;
  56. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  57. access_log off;
  58. expires 30d;
  59. break;
  60. }
  61. location ~* \.(txt|js|css)$ {
  62. add_header Pragma public;
  63. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  64. access_log off;
  65. expires 30d;
  66. break;
  67. }
  68. }
Comments powered by Disqus