Y
Y
Yuri2021-06-26 15:31:36
linux
Yuri, 2021-06-26 15:31:36

How to remove 404 in zabbix?

Hello. I install Nginx + PostgreSQL + Zabbix 5.4 on the Ubuntu 20.04 virtual machine. I went through all the steps from the Zabbix installation manual , all commands were executed without any errors in the console. Nginx displays a welcome page. However, when I go to my ip/zabbix, I get 404. There seem to be no errors in var/log/zabbix/zabbix_server.log, but I'm new to this topic, I might miss something. Here is the nginx.conf code, if you need additional information, write what it is.

server {

listen 80;

server_name example.com;

root /usr/share/zabbix

index index.php;

location = /favicon.ico {

log_not_found off;

}

location / {

try_files $uri $uri/ =404;

}

location /assets {

access_logoff;

expires 10d;

}

location ~ /\.ht {

deny all;

}

location ~ /(api\/|conf[^\.]|include|locale|vendor) {

deny all;

return 404;

}

location ~ [^/]\.php(/|$) {

fastcgi_pass unix:/var/run/php/zabbix.sock;

fastcgi_split_path_info ^(.+\.php)(/.+)$;

fastcgi_index index.php;

fastcgi_param DOCUMENT_ROOT /usr/share/zabbix;

fastcgi_param SCRIPT_FILENAME /usr/share/zabbix$fastcgi_script_name;

fastcgi_param PATH_TRANSLATED /usr/share/zabbix$fastcgi_script_name;

include fastcgi_params;

fastcgi_param QUERY_STRING $query_string;

fastcgi_param REQUEST_METHOD $request_method;

fastcgi_param CONTENT_TYPE $content_type;

fastcgi_param CONTENT_LENGTH $content_length;

fastcgi_intercept_errors on;

fastcgi_ignore_client_abort off;

fastcgi_connect_timeout 60;

fastcgi_send_timeout 180;

fastcgi_read_timeout 180;

fastcgi_buffer_size 128k;

fastcgi_buffers 4 256k;

fastcgi_busy_buffers_size 256k;

fastcgi_temp_file_write_size 256k;

}

}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2021-06-26
@q2digger

nginx logs to studio

V
vitaliy_2018, 2021-10-13
@vitaliy_2018

in the main nginx.conf file there is a link to the root directory "root /usr/share/nginx/html;
change it to "root /usr/share;" or whatever directory you have as the root directory for www

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question