Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. server {
  2. listen 80;
  3.  
  4. # access_log off;
  5. access_log /home/lpdk.me/logs/access.log;
  6. # error_log off;
  7. error_log /home/lpdk.me/logs/error.log;
  8.  
  9. root /home/lpdk.me/public_html;
  10. index index.php index.html index.htm;
  11. server_name lpdk.me;
  12. # SSL
  13. ssl_certificate /etc/letsencrypt/live/lpdk.me/fullchain.pem;
  14. ssl_certificate_key /etc/letsencrypt/live/lpdk.me/privkey.pem;
  15. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  16. ssl_prefer_server_ciphers on;
  17. ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
  18. # DH parameters
  19. ssl_dhparam /etc/nginx/ssl/dhparam.pem;
  20. # Enable HSTS
  21. add_header Strict-Transport-Security "max-age=31536000" always;
  22. location / {
  23. try_files $uri $uri/ /index.php?$args;
  24. }
  25.  
  26. # Custom configuration
  27. include /home/lpdk.me/public_html/*.conf;
  28.  
  29. location ~ \.php$ {
  30. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  31. include /etc/nginx/fastcgi_params;
  32. fastcgi_pass 127.0.0.1:9000;
  33. fastcgi_index index.php;
  34. fastcgi_connect_timeout 300;
  35. fastcgi_send_timeout 300;
  36. fastcgi_read_timeout 300;
  37. fastcgi_buffer_size 32k;
  38. fastcgi_buffers 8 16k;
  39. fastcgi_busy_buffers_size 32k;
  40. fastcgi_temp_file_write_size 32k;
  41. fastcgi_intercept_errors on;
  42. fastcgi_param SCRIPT_FILENAME /home/lpdk.me/public_html$fastcgi_script_name;
  43. }
  44.  
  45. # Disable .htaccess and other hidden files
  46. location ~ /\.(?!well-known).* {
  47. deny all;
  48. access_log off;
  49. log_not_found off;
  50. }
  51.  
  52. location = /favicon.ico {
  53. log_not_found off;
  54. access_log off;
  55. }
  56.  
  57. location = /robots.txt {
  58. allow all;
  59. log_not_found off;
  60. access_log off;
  61. }
  62.  
  63. 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)$ {
  64. gzip_static off;
  65. add_header Pragma public;
  66. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  67. access_log off;
  68. expires 30d;
  69. break;
  70. }
  71.  
  72. location ~* \.(txt|js|css)$ {
  73. add_header Pragma public;
  74. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  75. access_log off;
  76. expires 30d;
  77. break;
  78. }
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement