Guest User

flower21

a guest
Apr 21st, 2021
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name flower.local;
  4. return 301 https://flower.local$request_uri;
  5. }
  6.  
  7. server {
  8. listen 443 ssl;
  9. server_name flower.local;
  10. root /var/www/flower.local;
  11. index index.php;
  12. ###
  13. ssl_certificate /etc/nginx/certs/flower.local/fullchain.pem;
  14. ssl_certificate_key /etc/nginx/certs/flower.local/key.pem;
  15. ssl_session_timeout 1d;
  16. ssl_session_cache shared:MozSSL:10m;
  17. ssl_session_tickets off;
  18.  
  19. ssl_dhparam /etc/nginx/certs/dhparam/ffdhe2048.txt;
  20.  
  21. ssl_stapling on;
  22. ssl_stapling_verify on;
  23.  
  24. ssl_trusted_certificate /etc/nginx/certs/flower.local/ca.pem;
  25. ###
  26. add_header X-Content-Type-Options nosniff;
  27. # add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
  28.  
  29. error_log /var/log/nginx/flower.local.error.log;
  30. access_log /var/log/nginx/flower.local.access.log;
  31.  
  32. location / {
  33. try_files $uri $uri/ /index.php?$args;
  34. }
  35.  
  36. location = /favicon.ico {
  37. access_log off;
  38. }
  39. location = /robots.txt {
  40. access_log off;
  41. }
  42.  
  43. location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
  44. return 403;
  45. error_page 403 /403_error.html;
  46. }
  47. location ~* \.(jpg|jpeg|gif|png|bmp|ico|js|html|htm|css|swf|flv|txt|rtf|odt|ods|doc|xls|ppt|pdf)$ {
  48. expires 1d;
  49. }
  50.  
  51. location ~ \.php$ {
  52. fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
  53. #fastcgi_index index.php;
  54. include fastcgi_params;
  55. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  56. include snippets/fastcgi-php.conf;
  57. }
  58.  
  59. location ~ /\.svn {
  60. deny all;
  61. }
  62.  
  63. location ~ /\.git {
  64. deny all;
  65. }
  66.  
  67. location ~ /\.hg {
  68. deny all;
  69. }
  70.  
  71. }
  72.  
Advertisement
Add Comment
Please, Sign In to add comment