Advertisement
Guest User

Untitled

a guest
Feb 6th, 2022
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.37 KB | None | 0 0
  1. # dpkg -l | grep zabbix
  2. ii  zabbix-agent                          1:5.4.10-1+ubuntu20.04                      amd64        Zabbix network monitoring solution - agent
  3. ii  zabbix-frontend-php                   1:5.4.10-1+ubuntu20.04                      all          Zabbix network monitoring solution - PHP front-end
  4. ii  zabbix-release                        1:5.4-1+ubuntu20.04                         all          Zabbix official repository configuration
  5. ii  zabbix-server-mysql                   1:5.4.10-1+ubuntu20.04                      amd64        Zabbix network monitoring solution - server (MySQL)
  6. ii  zabbix-sql-scripts                    1:5.4.10-1+ubuntu20.04                      all          Zabbix network monitoring solution - sql-scripts
  7.  
  8. # NGINX config
  9. server {
  10.     listen 443 ssl http2;
  11.     server_name <my amazing domain>;
  12.  
  13.     access_log /var/log/nginx/monitor-access.log;
  14.     error_log /var/log/nginx/monitor-error.log;
  15.  
  16.     ssl_certificate /etc/letsencrypt/live/<my amazing domain>/fullchain.pem;
  17.     ssl_certificate_key /etc/letsencrypt/live/<my amazing domain>/privkey.pem;
  18.     ssl_session_cache shared:SSL:10m;
  19.     ssl_protocols TLSv1.2 TLSv1.3;
  20.     ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
  21.     ssl_prefer_server_ciphers on;
  22.  
  23.     # rewrite ^/(.*)/$ /$1 permanent;
  24.  
  25.     root    /usr/share/zabbix;
  26.  
  27.         index   index.php;
  28.  
  29.         location = /favicon.ico {
  30.                 log_not_found   off;
  31.         }
  32.  
  33.         location / {
  34.                 try_files       $uri $uri/ =404;
  35.         }
  36.  
  37.         location /assets {
  38.                 access_log      off;
  39.                 expires         10d;
  40.         }
  41.  
  42.         location ~ /\.ht {
  43.                 deny            all;
  44.         }
  45.  
  46.         location ~ /(api\/|conf[^\.]|include|locale|vendor) {
  47.                 deny            all;
  48.                 return          404;
  49.         }
  50.  
  51.         location ~ [^/]\.php(/|$) {
  52.                 fastcgi_pass    unix:/var/run/php/php7.4-fpm.sock;
  53.                 fastcgi_split_path_info ^(.+\.php)(/.+)$;
  54.                 fastcgi_index   index.php;
  55.  
  56.                 fastcgi_param   DOCUMENT_ROOT   /usr/share/zabbix;
  57.                 fastcgi_param   SCRIPT_FILENAME /usr/share/zabbix$fastcgi_script_name;
  58.                 fastcgi_param   PATH_TRANSLATED /usr/share/zabbix$fastcgi_script_name;
  59.                 fastcgi_param   PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
  60.  
  61.                 include fastcgi_params;
  62.                 fastcgi_param   QUERY_STRING    $query_string;
  63.                 fastcgi_param   REQUEST_METHOD  $request_method;
  64.                 fastcgi_param   CONTENT_TYPE    $content_type;
  65.                 fastcgi_param   CONTENT_LENGTH  $content_length;
  66.  
  67.                 fastcgi_intercept_errors        on;
  68.                 fastcgi_ignore_client_abort     off;
  69.                 fastcgi_connect_timeout         60;
  70.                 fastcgi_send_timeout            300;
  71.                 fastcgi_read_timeout            300;
  72.                 fastcgi_buffer_size             128k;
  73.                 fastcgi_buffers                 4 256k;
  74.                 fastcgi_busy_buffers_size       256k;
  75.                 fastcgi_temp_file_write_size    256k;
  76.         }
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement