_lan.conf 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # default_server for the LAN addresses getting the IPs by:
  2. # ifstatus lan | jsonfilter -e '@["ipv4-address","ipv6-address"].*.address'
  3. server {
  4. listen 80;
  5. server_name _lan;
  6. index luci index.html index.htm index.php default.html default.htm default.php;
  7. root /www;
  8. include conf.d/*.locations;
  9. location ~ [^/]\.php(/|$)
  10. {
  11. try_files $uri =404;
  12. fastcgi_pass unix:/var/run/php7-fpm.sock;
  13. fastcgi_index index.php;
  14. fastcgi_connect_timeout 300;
  15. fastcgi_send_timeout 300;
  16. fastcgi_read_timeout 300;
  17. fastcgi_buffer_size 64k;
  18. fastcgi_buffers 4 64k;
  19. fastcgi_busy_buffers_size 128k;
  20. fastcgi_temp_file_write_size 256k;
  21. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  22. fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/:/www/:/";
  23. include fastcgi_params;
  24. }
  25. location = /(robots.txt|favicon.ico) {
  26. log_not_found off;
  27. }
  28. location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
  29. expires 30d;
  30. }
  31. location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
  32. add_header Access-Control-Allow-Origin "*";
  33. expires 30d;
  34. }
  35. location ~ /\.(?!well-known) {
  36. deny all;
  37. }
  38. }