Portál AbcLinuxu, 12. května 2025 18:25
Dobry pokusam sa nainstalovat munin(monitorovaci RRD based program). Potrebujem aby bezal ako virtualny host v apachi.
Pouzil som tento navod:
http://www.debuntu.org/how-to-monitoring-a-server-with-munin-p2
Server je na lokalnej sieti a ma ip addresu: 192.168.76.4, pristupujem nan z ip: 192.168.76.9.
Vytvoril som: /etc/apache2/sites-available/monitoring a toto je vo vnutri:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName monitoring.example.com
DocumentRoot /var/www/munin
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel notice
CustomLog /var/log/apache2/access.log combined
ErrorLog /var/log/apache2/error.log
ServerSignature On
</VirtualHost>
nainstaloval som to :
sudo a2ensite monitoring
Toto mi pise pri kontrole pomocou: sudo apache2ctl -t:
r-c@rclr-srv:~$ sudo apache2ctl -t
apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.76.4 for ServerName
[Thu May 21 20:23:05 2009] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
Syntax OK[/QUOTE]
moj /etc/apache2/apache2.conf
[QUOTE]ServerRoot "/etc/apache2"
LockFile /var/lock/apache2/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
DefaultType text/plain
HostnameLookups Off
ErrorLog /var/log/apache2/error.log
LogLevel warn
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combin$
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
ServerTokens Full
ServerSignature On
Include /etc/apache2/conf.d/
Include /etc/apache2/sites-enabled/
toto by mal byt jediny virtual host:
Vytvoril som: /etc/apache2/sites-available/monitoring a toto je vo vnutri:
Vytvoril som: /etc/apache2/sites-available/monitoring a toto je vo vnutri:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName monitoring.example.com
DocumentRoot /var/www/munin
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel notice
CustomLog /var/log/apache2/access.log combined
ErrorLog /var/log/apache2/error.log
ServerSignature On
</VirtualHost>.
myslite monitoring.example.com zmenit za ip servera?
toto by mal byt jediny virtual host:To nedává smysl, virtualhost se zřizuje proto, abyste mohl na jedné instanci Apache (a často na jedné IP adrese) provozovat víc webů. Pokud tam chcete provozovat jen jeden, není potřeba zřizovat virtualhost. Navíc Apache tvrdí, že mícháte dva způsoby konfigurace virtualhostu (podle jména a podle IP adresy), takže tam musí být alespoň dva. Nebo máte jeden server nakonfigurovaný mimo virtualhost a druhý ve virtualhostu – pak je problém v tom, a je potřeba oba weby nakonfigurovat jako virtualhost.
r-c@rclr-srv:/etc/apache2/sites-available$ ls
default monitoring
neviem preco ale na viacerych strankach s instalaciou toho muninu, davaju navod na vytvorenie virtualhostu, a kedze sa do apache nevyznam neviem ako to riesit. A potreboval by som nainstalovat ten munin.
Neviem vobec kde by mohla byt chyba.
Vyriesil som to: pridanim tohoto do /etc/apache2/apache2.conf
ScriptAlias /munin/cgi/ /var/www/munin/cgi/
Alias /munin/ /var/www/munin/
Alias /munin /var/www/munin/
teraz pristupujem do munina: http://192.168.76.4/munin
Dik za pomoc
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.