Ad Widget

Collapse

Zabbix FrontEnd Issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • uncram
    Junior Member
    • Jul 2017
    • 16

    #1

    Zabbix FrontEnd Issue

    Rhel 7.3 box and install Zabbix for first time. Install, db setup, and server conf go find. Use PHP info page also works. But when try to Get 404 for Frontend. Zabbix logs say success. This is my first install so when I re-read and got to the configure php part this is below. Problem is it never made a .conf in httpd. So I do have it working on centos and copied over, still won't work. My thinking is the install tell Apache more to do with Zabbix than just this config file. So how do I replace or fix or replace?


    — Configuring PHP For Zabbix
    The Zabbix web interface is written in PHP and requires some special PHP server settings. The Zabbix installation process created an Apache configuration file that contains these settings. It is located in the directory /etc/httpd/conf.d/ and is loaded automatically by Apache. We need to make a small change to this file, so open it up.


    Below is my .conf I copied. Again I can post httpd logs or Zabbix but it says successful startup and http just shows me requesting the zabbix page that wont load. Php info works fine. Can I just copy a good copy of the .conf into httpd and what does that look like for Rhel7.3 updated?


    Alias /zabbix /usr/share/zabbix

    <Directory "/usr/share/zabbix">
    Options FollowSymLinks
    AllowOverride None

    <IfModule mod_authz_core.c>
    # Apache 2.4
    Require all granted
    </IfModule>

    <IfModule !mod_authz_core.c>
    # Apache 2.2
    Order allow,deny
    Allow from all
    </IfModule>

    <IfModule mod_php5.c>
    php_value max_execution_time 300
    php_value memory_limit 128M
    php_value post_max_size 16M
    php_value upload_max_filesize 2M
    php_value max_input_time 300

    # Removed in PHP 7
    php_value always_populate_raw_post_data -1

    php_flag session.auto_start off
    php_value mbstring.func_overload 0
    php_value date.timezone America/New_York
    </IfModule>
    </Directory>

    <Directory ~ "^/usr/share/zabbix/(conf|app|include|local)/">
    <IfModule mod_authz_core.c>
    # Apache 2.4
    Require all denied
    </IfModule>

    <IfModule !mod_authz_core.c>
    # Apache 2.2
    Order deny,allow
    Deny from all
    </IfModule>

    <files *.php>
    <IfModule mod_authz_core.c>
    # Apache 2.4
    Require all denied
    </IfModule>

    <IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
    </IfModule>

    </files>
    </Directory>
  • uncram
    Junior Member
    • Jul 2017
    • 16

    #2
    Update

    Apache = 2.4.6
    Zabbix = 3.2
    RHEL 7.3
    PHP = 5.4.16

    I installed by using RPM. Just need to know if you can easily copy a .conf file into Apache and it will work. Or does the rpm install add some other system hooks?

    Ok I did a yum remove zabbix-my-sql and it removed the httpd.conf.d zabbix.conf file. Then I reinstalled and it looks like a new clean version.

    Still get 404 when accessing frontend. Phpinfo is still working.

    This is httpd access log:
    [Mon Jul 10 09:56:27.241564 2017] [mpm_prefork:notice] [pid 28036] AH00163: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 PHP/5.4.16 configured -- resuming normal operations
    [Mon Jul 10 09:56:27.241636 2017] [core:notice] [pid 28036] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
    [Mon Jul 10 09:56:39.476315 2017] [mpm_prefork:notice] [pid 28036] AH00170: caught SIGWINCH, shutting down gracefully
    [Mon Jul 10 09:57:22.163977 2017] [suexec:notice] [pid 28097] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Mon Jul 10 09:57:22.195354 2017] [auth_digest:notice] [pid 28097] AH01757: generating secret for digest authentication ...
    [Mon Jul 10 09:57:22.196093 2017] [lbmethod_heartbeat:notice] [pid 28097] AH02282: No slotmem from mod_heartmonitor
    [Mon Jul 10 09:57:22.196165 2017] [ssl:warn] [pid 28097] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
    [Mon Jul 10 09:57:22.225392 2017] [mpm_prefork:notice] [pid 28097] AH00163: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 PHP/5.4.16 con


    My new Zabbix config =


    #
    # Zabbix monitoring system php web frontend
    #

    Alias /zabbix /usr/share/zabbix

    <Directory "/usr/share/zabbix">
    Options FollowSymLinks
    AllowOverride None
    Require all granted

    <IfModule mod_php5.c>
    php_value max_execution_time 300
    php_value memory_limit 128M
    php_value post_max_size 16M
    php_value upload_max_filesize 2M
    php_value max_input_time 300
    php_value always_populate_raw_post_data -1
    php_value date.timezone America/New_York
    </IfModule>
    </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>
    ~
    Last edited by uncram; 10-07-2017, 16:38.

    Comment

    • uncram
      Junior Member
      • Jul 2017
      • 16

      #3
      No help at all...

      After more than 80 views no one even made a comment at all...

      I resolved this by copying the /usr/share/zabbix to /var/www/html/zabbix
      set group and permissions. Hope this helps someone else.

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        If you do not run with Zabbix's package installation with the RHEL 7.3 standard package configuration, you probably have changed from the default settings.

        If you do not provide information that you have set yourself, it is difficult to identify the problem.

        If a 404 error has occurred, the contents of access_log and error_log output at that time are also useful for identifying the cause.

        Comment

        • LenR
          Senior Member
          • Sep 2009
          • 1005

          #5
          So you get the Zabbix setup web screens, but not the dashboard?

          If you're not getting the setup screens, did you restart the web server after the zabbix frontend install? Standard install would create /etc/httpd/conf.d/zabbix.conf that points to the frontend.

          (file/path from memory)

          Does the default Apache splash page load? (Server url without /zabbix)

          Comment

          • LenR
            Senior Member
            • Sep 2009
            • 1005

            #6
            Also, what install doc are you following? I've seen people follow blog posts that are wrong. If it's not vendor, don't trust it :-)

            Comment

            • Barazbay
              Junior Member
              • Sep 2017
              • 1

              #7
              Dear LenR


              I was able to reproduce the issue on ubuntu 17.04 and zabbix 3.4.
              I've followed this installation manual https://www.zabbix.com/documentation...ion_with_mysql since there is no documantation for 3.4 version.

              The solution is to append into
              sudo vim /etc/apache2/apache2.conf

              the following line with zabbix configuration directory:
              IncludeOptional conf-available/*.conf

              I have also tried the solution offered by unicram, it worked as well, but apache then has read the default configuration file with improper variables for zabbix. Hope this will help someone.

              Comment

              Working...