Advertisement
Guest User

Untitled

a guest
May 28th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. server {
  2. server_name www.domain.com domain.com;
  3. listen 80;
  4.  
  5. return 301 https://domain.com$request_uri;
  6. }
  7.  
  8. server {
  9. server_name www.domain.com
  10. listen 443 ssl;
  11.  
  12. /* SSL Stuff */
  13.  
  14. return 301 https://domain.com$request_uri;
  15. }
  16.  
  17.  
  18. server {
  19. server_name domain.com;
  20. index index.php index.html index.htm;
  21. listen 443 ssl;
  22. root /usr/share/nginx/domain.com;
  23.  
  24. /* SSL Stuff */
  25.  
  26. location / {
  27. try_files $uri $uri/ /index.php?$args;
  28. }
  29.  
  30.  
  31. location ~ .php$ {
  32. try_files $uri =404;
  33. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  34. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  35. include fastcgi_params;
  36. }
  37.  
  38. location ~ /. {
  39. deny all;
  40. }
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement