OpenSource CLI-App to install and handle stuff related to Web-Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
927 B

4 years ago
  1. @extends($ssl ? 'layouts.ssl' : 'layouts.no-ssl')
  2. @section('server')
  3. root {{ $root }};
  4. index {{ $index }};
  5. # rewrite
  6. location / {
  7. try_files $uri $uri/ /index.php?$args;
  8. }
  9. location = /favicon.ico {
  10. log_not_found off;
  11. access_log off;
  12. }
  13. location = /robots.txt {
  14. allow all;
  15. log_not_found off;
  16. access_log off;
  17. }
  18. location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
  19. expires max;
  20. log_not_found off;
  21. }
  22. location ~ /\. {
  23. deny all;
  24. }
  25. location ~* /(?:uploads|files)/.*\.php$ {
  26. deny all;
  27. }
  28. # php-fpm configuration.
  29. location ~ \.php(/|$) {
  30. fastcgi_split_path_info ^(.+\.php)(.*)$;
  31. fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  32. fastcgi_index index.php;
  33. fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
  34. fastcgi_param DOCUMENT_ROOT $realpath_root;
  35. include /etc/nginx/fastcgi_params;
  36. }
  37. @endsection