Advertisement
vinzlee

sites-availableBeforeSSL

Dec 13th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. server
  2. {
  3. listen 80;
  4. listen [::]:80;
  5. listen 443 ssl http2;
  6. listen [::]:443 ssl http2;
  7.  
  8. root /var/www/html/mywebsite;
  9. index index.php index.html index.htm index.nginx-debian.html;
  10.  
  11. server_name mywebsite.com www.mywebsite.com;
  12.  
  13. location /
  14. {
  15. try_files $uri $uri/ /index.html;
  16. }
  17.  
  18. location ~ \.php$
  19. {
  20. try_files $uri = 404;
  21. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  22. fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
  23. fastcgi_index index.php;
  24. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  25. include fastcgi_params;
  26. }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement