Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. server {
  2. listen 80 default_server;
  3. listen [::]:80 default_server;
  4. server_name example.com www.example.com;
  5. return 301 https://$server_name$request_uri;
  6. server_tokens off;
  7. }
  8.  
  9. server {
  10. listen 443 ssl default_server;
  11. listen [::]:443 ssl default_server;
  12. autoindex on;
  13. server_tokens off;
  14. server_name example.com www.example.com;
  15.  
  16. ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
  17. ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
  18.  
  19. root /data/example.com/www;
  20. index index.php index.html index.htm;
  21.  
  22. error_page 404 /404.html;
  23. error_page 500 502 503 504 /50x.html;
  24. location = /50x.html {
  25. root /data/example.com/www;
  26. }
  27.  
  28. # Error & Access logs
  29. error_log /data/example.com/logs/error.log error;
  30. access_log /data/example.com/logs/access.log;
  31.  
  32. location / {
  33. index index.php index.html;
  34. }
  35.  
  36. location ~ /.well-known {
  37. allow all;
  38. }
  39.  
  40. location ~ [^/].php(/|$) {
  41. fastcgi_split_path_info ^(.+?.php)(/.*)$;
  42. fastcgi_pass unix:/var/run/php5-fpm.sock;
  43. fastcgi_index index.php;
  44. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  45. include fastcgi_params;
  46. }
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement