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.

46 lines
1.1 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
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|woff|eot|ttf|svg|mp4|webm)$ {
  19. expires max;
  20. log_not_found off;
  21. access_log off;
  22. }
  23. location ~ /\. {
  24. deny all;
  25. }
  26. location ~* /(?:uploads|files)/.*\.php$ {
  27. deny all;
  28. }
  29. # php-fpm configuration.
  30. location ~ \.php(/|$) {
  31. fastcgi_split_path_info ^(.+\.php)(.*)$;
  32. fastcgi_pass unix:/var/run/php/{{ $phpFpm }}.sock;
  33. fastcgi_index index.php;
  34. fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
  35. fastcgi_param DOCUMENT_ROOT $realpath_root;
  36. include /etc/nginx/fastcgi_params;
  37. }
  38. @endsection