Guest User

Untitled

a guest
May 9th, 2020
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name www.domain.com domain.com;
  4. access_log /var/log/nginx/domain.com.log;
  5. error_log /var/log/nginx/domain.com_error.log;
  6. rewrite ^(.*) https://domain.com$1 permanent;
  7. server_tokens off;
  8. }
  9.  
  10. server {
  11. listen 443 ssl;
  12. ssl on;
  13. ssl_certificate /etc/ssl/domain.com/fullchain.pem;
  14. ssl_certificate_key /etc/ssl/domain.com/private.key;
  15. ssl_dhparam /etc/ssl/domain.com/dhparam.pem;
  16. ssl_session_timeout 10m;
  17. ssl_protocols TLSv1.2 TLSv1.3;
  18. ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL;
  19. ssl_session_cache shared:SSL:10m;
  20. add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; ";
  21. ssl_prefer_server_ciphers on;
  22. server_name domain.com;
  23. root /var/www/domain.com;
  24. access_log /var/log/nginx/domain.com.log;
  25. error_log /var/log/nginx/domain.com_error.log;
  26. index index.php index.html index.htm index.nginx-debian.html;
  27. rewrite_log on;
  28. server_tokens off;
  29. location / {
  30. try_files $uri $uri/ =404;
  31. }
  32. location ~ \.php$ {
  33. include snippets/fastcgi-php.conf;
  34. fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  35. }
  36. location ~ /\.ht {
  37. deny all;
  38. }
  39. }
Add Comment
Please, Sign In to add comment