Advertisement
tarrac

Untitled

May 16th, 2023
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. server {
  2. listen 81;
  3. # server_name example.com;
  4.  
  5. root /usr/share/zabbix;
  6.  
  7. index index.php;
  8.  
  9. location = /favicon.ico {
  10. log_not_found off;
  11. }
  12.  
  13. location / {
  14. try_files $uri $uri/ =404;
  15. }
  16.  
  17. location /assets {
  18. access_log off;
  19. expires 10d;
  20. }
  21.  
  22. location ~ /\.ht {
  23. deny all;
  24. }
  25.  
  26. location ~ /(api\/|conf[^\.]|include|locale) {
  27. deny all;
  28. return 404;
  29. }
  30.  
  31. location /vendor {
  32. deny all;
  33. return 404;
  34. }
  35.  
  36. location ~ [^/]\.php(/|$) {
  37. fastcgi_pass unix:/run/php-fpm/zabbix.sock;
  38. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  39. fastcgi_index index.php;
  40.  
  41. fastcgi_param DOCUMENT_ROOT /usr/share/zabbix;
  42. fastcgi_param SCRIPT_FILENAME /usr/share/zabbix$fastcgi_script_name;
  43. fastcgi_param PATH_TRANSLATED /usr/share/zabbix$fastcgi_script_name;
  44.  
  45. include fastcgi_params;
  46. fastcgi_param QUERY_STRING $query_string;
  47. fastcgi_param REQUEST_METHOD $request_method;
  48. fastcgi_param CONTENT_TYPE $content_type;
  49. fastcgi_param CONTENT_LENGTH $content_length;
  50.  
  51. fastcgi_intercept_errors on;
  52. fastcgi_ignore_client_abort off;
  53. fastcgi_connect_timeout 60;
  54. fastcgi_send_timeout 180;
  55. fastcgi_read_timeout 180;
  56. fastcgi_buffer_size 128k;
  57. fastcgi_buffers 4 256k;
  58. fastcgi_busy_buffers_size 256k;
  59. fastcgi_temp_file_write_size 256k;
  60. }
  61. }
  62.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement