Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th August 2011, 21:54
gawry gawry is offline
Junior Member
 
Join Date: Jun 2010
Posts: 23
Thanks: 3
Thanked 1 Time in 1 Post
Default Installing Zabbix on server with ISPConfig

Hi folks...

I'm trying to monitor my servers with zabbix but i'm having problems installing it.

I did the usual
Code:
apt-get install zabbix-server-mysql zabbix-frontend-php zabbix-agent
and then I've added a website in ISPConfig.

monitor.domain.com
With SuExec and FCGI

I've added the following to the apache directives

Code:
# Define /zabbix alias, this is the default
<IfModule mod_alias.c>
    Alias /zabbix /usr/share/zabbix
</IfModule>

#SSLEngine on
#SSLCertificateKeyFile /etc/apache2/ssl/ispserver.key
#SSLCertificateFile /etc/apache2/ssl/STAR_hostpress_me.crt
#SSLCertificateChainFile /etc/apache2/ssl/hostpress_me.ca-bundle

    <Directory "/usr/share/zabbix">
AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-#fcgi-starter .php
        Options +ExecCGI
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
but as i'm not an experienced Apache admin i'm not really sure if this is the right way to do it.
Reply With Quote
Sponsored Links
  #2  
Old 11th August 2011, 12:21
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

Looks ok, but can you post the full Apache vhost configuration of that web site so that I can take a look?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 11th August 2011, 17:27
gawry gawry is offline
Junior Member
 
Join Date: Jun 2010
Posts: 23
Thanks: 3
Thanked 1 Time in 1 Post
Default

Here is the vhost file

Code:
<Directory /var/www/monitor.domain.me>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /var/www/monitor.domain.me/web
  
    ServerName monitor.domain.me
    ServerAdmin webmaster@monitor.domain.me

    ErrorLog /var/log/ispconfig/httpd/monitor.domain.me/error.log


    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 503 /error/503.html
	
    <Directory /var/www/monitor.domain.me/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client1/web5/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>


    # suexec enabled
    SuexecUserGroup web5 client1
    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # php as fast-cgi enabled
    <IfModule mod_fcgid.c>
      
	  # SocketPath /tmp/fcgid_sock/
	  
	  # IdleTimeout n (3600 seconds)
	  # An idle fastcgi application will be terminated after IdleTimeout seconds.
      IdleTimeout 3600
	  
	  # ProcessLifeTime n (7200 seconds)
      # A fastcgi application will be terminated if lifetime expired, even no error is detected.
      ProcessLifeTime 7200
	  
	  # MaxProcessCount n (1000)
      # The max count of total fastcgi process count.
      # MaxProcessCount 1000
      
	  # DefaultMinClassProcessCount n (3)
      # The minimum number of fastcgi application instances for any one fastcgi application.
      # Idle fastcgi will not be killed if their count is less than n
      # Set this to 0, and tweak IdleTimeout
	  DefaultMinClassProcessCount 0
	  
	  # DefaultMaxClassProcessCount n (100)
      # The maximum number of fastcgi application instances allowed to run for
      # particular one fastcgi application.
      DefaultMaxClassProcessCount 100
	  
	  # IPCConnectTimeout n (3 seconds)
      # The connect timeout to a fastcgi application.
      IPCConnectTimeout 8
	  
	  # IPCCommTimeout n (20 seconds)
      # The communication timeout to a fastcgi application. Please increase this
      # value if your CGI have a slow initialization or slow respond.
      IPCCommTimeout 360
      
	  # BusyTimeout n (300 seconds)
      # A fastcgi application will be terminated if handing a single request
      # longer than busy timeout.
	  BusyTimeout 300
	  
    </IfModule>
    <Directory /var/www/monitor.domain.me/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
	<Directory /var/www/clients/client1/web5/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web5 client1
    </IfModule>

    <IfModule mod_dav_fs.c>
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>

# Define /zabbix alias, this is the default
<IfModule mod_alias.c>
    Alias /zabbix /usr/share/zabbix
</IfModule>

#SSLEngine on
#SSLCertificateKeyFile /etc/apache2/ssl/ispserver.key
#SSLCertificateFile /etc/apache2/ssl/STAR_domain_me.crt
#SSLCertificateChainFile /etc/apache2/ssl/domain_me.ca-bundle

    <Directory "/usr/share/zabbix">
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-#fcgi-starter .php
        Options +ExecCGI
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
Reply With Quote
  #4  
Old 11th August 2011, 17:29
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

Plese remove the # in the line:

FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-#fcgi-starter .php

so that it reads:

FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 11th August 2011, 17:41
gawry gawry is offline
Junior Member
 
Join Date: Jun 2010
Posts: 23
Thanks: 3
Thanked 1 Time in 1 Post
Default

Great! I believe we are close. I can see the Login page.

But there are a couple errors

Code:
    file_exists(): open_basedir restriction in effect. File(/usr/share/zabbix/conf/zabbix.conf.php) is not within the allowed path(s): (/var/www/clients/client1/web5/web:/var/www/clients/client1/web5/tmp:/var/www/monitor.domain.me/web:/srv/www/monitor.domain.me/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/zabbix)[/usr/share/zabbix/include/config.inc.php:129]
    file_exists(): open_basedir restriction in effect. File(/usr/share/zabbix/conf/zabbix.conf.php) is not within the allowed path(s): (/var/www/clients/client1/web5/web:/var/www/clients/client1/web5/tmp:/var/www/monitor.domain.me/web:/srv/www/monitor.domain.me/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/zabbix)[/usr/share/zabbix/include/config.inc.php:164]
    include_once(setup.php): failed to open stream: No such file or directory[/usr/share/zabbix/include/config.inc.php:225]
    include_once(): Failed opening 'setup.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear')[/usr/share/zabbix/include/config.inc.php:225]
    Unable to select configuration
    Timezone for PHP is not set. Please set "date.timezone" option in php.ini.
Reply With Quote
  #6  
Old 11th August 2011, 17:48
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

Add the path to zabbix "/usr/share/zabbix" to the open_basedir path setting on the options tab.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
gawry (11th August 2011)
  #7  
Old 11th August 2011, 18:07
gawry gawry is offline
Junior Member
 
Join Date: Jun 2010
Posts: 23
Thanks: 3
Thanked 1 Time in 1 Post
Default

I've added but it didn't work. So I added the exactly the path he gave me.

Code:
/usr/share/zabbix:/usr/share/zabbix/conf/zabbix.conf.php
But know i have different errors. It doesnt show the login page but a Warning with the following errors

Code:
    include(/etc/zabbix/dbconfig.php): failed to open stream: Permission denied[/usr/share/zabbix/include/config.inc.php:131]
    include(): Failed opening '/usr/share/zabbix/conf/zabbix.conf.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear')[/usr/share/zabbix/include/config.inc.php:131]

Zabbix is temporarily unavailable!
Reply With Quote
  #8  
Old 11th August 2011, 18:26
gawry gawry is offline
Junior Member
 
Join Date: Jun 2010
Posts: 23
Thanks: 3
Thanked 1 Time in 1 Post
 
Default

It seems to be working now.


I've just changed permissions of the dbconfig.php file to -rw-r--r-- and it worked

-rw-r--r-- 1 www-data www-data 482 Aug 11 12:10 /etc/zabbix/dbconfig.php
Reply With Quote
The Following User Says Thank You to gawry For This Useful Post:
falko (12th August 2011)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php Apps email not going through palkat General 8 21st September 2011 06:35
ISPConfig 3 - CentOS 5.4 - SSL Problems!?! owainbaber Installation/Configuration 4 26th July 2011 18:12
Virtual Users+Postfix+Courier+CentOS problem telnet localhost 25 stinson HOWTO-Related Questions 11 5th February 2011 14:57
subdomain and mail relay configuration aranthorn Installation/Configuration 24 3rd September 2007 23:53
Problems with Postfix Mysql Courier PatrickAdrichem Installation/Configuration 3 13th April 2007 16:44


All times are GMT +2. The time now is 12:03.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.