Apache with Zabbix, Can't get URL to work

Discussion in 'Installation/Configuration' started by stuffman, May 18, 2006.

  1. stuffman

    stuffman New Member

    Hello,
    I've followed the howto on Zabbix, and after two reinstalls (I like starting over at square one) I still have the same problem. Apache is working, I can go to http://ipaddress, but not http://ipaddress/~zabbix without getting a 404. Can anyone give me a rundown of things to check? Thanks,

    Stuff
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What exactly did you do to install Zabbix? Which distribution do you use?
     
  3. stuffman

    stuffman New Member

    Sorry for the delay, I didn't know anyone had replied. Anyhoo, I'm using Fedora Core 5 and the most recent version of Zabbix, 1.1beta12. I've tried several different versions of zabbix, and FC3 and 4. I have had some bumps along the way, but they all seem to install eventually, but I have the same problem in all cases. I followed the howto at:
    http://www.howtoforge.com/zabbix_network_monitoring
    and I'm thinking there must be a step or two missing. The howto is very good except for two things that came up in FC5, namely the snmp-net-devel and mysql-server that needed to be installed, and a problem with the httpd.conf file that required copying the .bak file in its place. Otherwise it installed just like it did on the other releases of fedora, and had the same outcome. I have a feeling that the problem might be with the following edits to the httpd.conf file:
    <Directory /home/*/public_html>
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS PROPFIND>
    Order allow,deny
    Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
    Order deny,allow
    Deny from all
    </LimitExcept>
    </Directory>
    I inserted this text in where the other references to <Directory> were found, but if someone could look over the syntax and make sure it will actually allow someone to connect to http://servername/~username I'd appreciate it. Whenever I try to connect to http://servername/~zabbix I get a 404 page not found. It might be worth mentioning that if I go to http://servername I get the apache placeholder page. Also, the howto shows how to configure an agent, but I'm sure that's for a different machine. Most of the steps in the last part of the howto have already been done early on in the howto. Thanks in advance,


    Stuff
     
  4. stuffman

    stuffman New Member

    Okay, I think I have the problem on the run, but I haven't quite figured it out yet. I went into the httpd.conf file and remarked the "UserDir disable" parameter, then unremarked the "UserDir public_html" parameter. This now results in my being able to go to http://servername/~zabbix and getting a blank white screen, but no 404. I'm wondering now if I may have a permissions issue or something. Does anyone know of a logfile that I can check to see what's going on? Thanks,

    Stuff
     
  5. falko

    falko Super Moderator Howtoforge Staff

    Have a look at your Apache's error log. This is usually in /var/log/httpd or /var/log/httpd2 or /var/log/apache or /var/log/apache2.
     
  6. stuffman

    stuffman New Member

    Thanks for pointing me to the logfile, I'm seeing this message a lot in error_log.1 under the httpd directory:

    [Fri Jun 02 15:57:12 2006] [error] [client 10.1.1.106] PHP Fatal error: Call to undefined function mysql_pconnect() in /home/zabbix/public_html/include/db.inc.php on line 39

    Line 39 in the db.inc.php file is as follows:
    $DB=mysql_pconnect($DB_SERVER,$DB_USER,$DB_PASSWORD);

    (Actually line 39 wraps around from line 38, the entire string is too long for one line. The wrap happens right before the "$DB_PASSWORD);". I've attached the entire db.inc.php file in case anyone wants to have a look and shed some light on this problem for me. Thanks again everybody,

    Stuff
     

    Attached Files:

  7. falko

    falko Super Moderator Howtoforge Staff

    Did you install the PHP-MySQL extension?
     
  8. stuffman

    stuffman New Member

    Falko,

    YOU ARE THE MAN!! I finally got a login screen after about one month of trying. Thanks, I really appreciate it.


    Stuff
     
  9. stuffman

    stuffman New Member

    Heh, I guess I'm not quite done asking questions. I can't seem to get any hosts to register on Zabbix. I've installed the w32 agent on my XP SP2 box, and as part of the process of installing zabbix I installed the agent on the machine that is hosting the software. Neither of these two boxes will successfully connect via port 10050, and I've checked that there are no firewalls in the picture that could be messing things up. I've attached a screenshot, please have a look and let me know if anything strikes you as odd at first glance. Thanks,

    Stuff
     

    Attached Files:

  10. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    netstat -tap
    ?
    Anything in the logs?
     

Share This Page