Ad Widget

Collapse

Zabbix http access issue on local host

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hsingh@redseal.net
    Junior Member
    • May 2022
    • 12

    #1

    Zabbix http access issue on local host


    I was successfully able to install/run the Zabbix monitoring tool on my VM host(centOS 8). The monitoring system is up and running, but when I tried to access the application from my localhost's web browser, I got the following error message:

    Click image for larger version

Name:	Screen Shot 2022-05-23 at 11.49.21 AM.png
Views:	1401
Size:	26.8 KB
ID:	445012

    I am unsure if I have to change anything in the /etc/httpd/conf.d/zabbix.conf file. Here is what I have in that file:


    #

    # Zabbix monitoring system php web frontend

    #

    Alias /zabbix /usr/share/zabbix


    ProxyTimeout 300

    <Directory "/usr/share/zabbix">

    Options FollowSymLinks

    AllowOverride None

    Require all granted


    <IfModule dir_module>

    DirectoryIndex index.php

    </IfModule>


    <FilesMatch \.(php|phar)$>

    SetHandler "proxy:unix:/run/php-fpm/zabbix.sock|fcgi://localhost"

    </FilesMatch>

    </Directory>


    <Directory "/usr/share/zabbix/conf">

    Require all denied

    </Directory>


    <Directory "/usr/share/zabbix/app">

    Require all denied

    </Directory>


    <Directory "/usr/share/zabbix/include">

    Require all denied

    </Directory>


    <Directory "/usr/share/zabbix/local">

    Require all denied

    </Directory>


    <Directory "/usr/share/zabbix/vendor">

    Require all denied

    </Directory>

  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    If you are using CentOS 8, have you set firewalld? By default, external connections on port number 80 should be disabled.

    For example, if you are using the default public zone and you want to allow HTTP access, run the following command as the root user:
    Code:
    # firewall-cmd --add-service=http --zone=public --permanent
    Please set according to your network environment.

    Comment

    • hsingh@redseal.net
      Junior Member
      • May 2022
      • 12

      #3
      Thank You for replying, Atsushi. Even though the above command was successful, I didn't solve the issue. As I mentioned above, this Monitoring tool is added on a VMware host(cent8 OS), and I am trying to gain HTTP access on my local machine; I wonder if the VMware firewall is causing any issue?

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        Atsushi had you rule out the most common reason why your web browser on your client system can't connect to the web server on your Zabbix front end. Since that wasn't the problem, now we need to consider other potential causes.

        1) is the web server running on the CentOS 8 host? Assuming Apache httpd is the web server you're using (the config file you show definitely seems to be for Apache httpd), you want to verify that the web server is running:

        Code:
        sudo systemctl status -l httpd.service
        That should return output indicating that it is running.

        2) httpd no longer loads the PHP module into its own address space, instead the PHP interpreter runs via a FastCGI processor. Make certain that the worker pool for the 'zabbix' PHP-FPM is running:

        Code:
        sudo systemctl status -l php-fpm.service
        That should also show that there are multiple php-fpm workers running.

        3) It's possible for httpd to be running but not listening on the port you expect OR not binding to the IP address you expect. This is highly unlikely to be the case, but it's possible. Probably best to verify it is listening as expected:

        Code:
        sudo ss -tlnp | egrep :80
        'ss' is the Linux command that is slowly replacing 'netstat'. If your Zabbix web front-end is using TLS, the port you should grep for is ':443' instead of ':80'.

        Comment

        Working...