Can't access Zabbix dashboard using EC2

0

Hi AWS, I am trying to access Zabbix dashboard after installing and setting up the Zabbix on AWS EC2 Linux Ubuntu 22.04 (Jammy AMI). The screenshot of the Security Group rules is attached. Zabbix Server SG Rules

When I am trying to access the dashboard using http://<ec2-public-ip>/zabbix, I am experiencing the error as highlighted in the screenshot.

Zabbix Dashboard error

The installation went smooth but I don't know why this error is coming.

Please help

profile picture
Arjun
asked 8 months ago350 views
3 Answers
0

Hello.

Is the web server running?
Have you executed the following commands?
https://www.zabbix.com/download?zabbix=6.4&os_distribution=ubuntu&os_version=22.04&components=server_frontend_agent&db=mysql&ws=apache

systemctl restart zabbix-server zabbix-agent apache2
systemctl enable zabbix-server zabbix-agent apache2

On the AWS side, is the communication allowed by the network ACL?

profile picture
EXPERT
answered 8 months ago
  • Yes the web server is running. I have also executed the commands and I believe the communication is allowed by the network ACL. Can you please confirm if the security group rules are correct or I need to any more or modify any of the existing ones?

  • The security group seemed fine. Network ACLs cannot be confirmed due to lack of images. Can you share your setup with us?
    Also, is there a route to the Internet Gateway configured in the route table for the subnet on which EC2 is running?

  • Can you share your Apache configuration files? There is probably a point where the listen port is set to 8080.

  • Thanks for sharing. The AWS network area looks fine. If you are not using Apache, would it be possible to share the Nginx configuration file?

0

So there is a catch when I am typing <public-ip>:<port> it showed me the Zabbix dashboard web page. Here is the screenshot. Now I have a question why it is not working the way as being mentioned in the Zabbix documentation Zabbix documentation

I am also adding the NACL configuration screenshots and I am using Nginx not Apache.

NACL inbound NACL subnet Subnet RT

Please acknowledge Riku_Kobayashi

profile picture
Arjun
answered 8 months ago
  • Added comment

  • I have updated the last comment. Please review it once Riku_Kobayashi

  • Added comment

0

Hi Riku_Kobayashi, here is the Nginx Configuration file.

nginx.conf:

server {
        listen          8080;
        server_name     _;

        root    /usr/share/zabbix;

        index   index.php;

        location = /favicon.ico {
                log_not_found   off;
        }

        location / {
                try_files       $uri $uri/ =404;
        }

        location /assets {
                access_log      off;
                expires         10d;
        }

        location ~ /\.ht {
                deny            all;
        }

        location ~ /(api\/|conf[^\.]|include|locale) {
                deny            all;
                return          404;
        }

        location /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;
        }
}
profile picture
Arjun
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions