Bonjour,
J'ai installé Munin sur mon serveur Ubuntu 12.04 hébergé par OVH et j'ai activé ses plugins Apache. Dans un premier temps, les graphes d'Apache n'apparaissaient pas et après quelques recherches dans la doc, j'ai fini par trouver que Munin avait besoin d'avoir accès à /var/cache/munin/www/ depuis 127.0.0.1 et qu'il fallait indiquer la <location> de /server-status dans le fichier de config du vhost default. Je me suis aussi souvenu que j'avais désactivé default (a2dissite default) de mes vhosts-enabled... J'ai donc modifié sa configuration en conséquence et je l'ai réactivé.
Comme prévu, les graphes d'Apache de Munin se sont mis à tracer et j'étais bien content... Mais, un problème auquel je ne m'attendais pas est apparu : un des vhosts qui sert un des noms de domaine configuré sur ce serveur pointait vers le vhost default !!! :/
En résumé, actuellement avec le vhost default désactivé : http://ns358756.ovh.net/ pointe vers http://www.conciergeriepme.fr/ ce qui est "étrange" mais pas vraiment gênant sauf pour les plugins Apache de Munin que je voulais faire fonctionner...
Et en activant le vhost default pour permettre à Munin de tracer les graphes du plugin Apache, j'obtiens le fonctionnement exactement inverse du précédent à savoir : http://www.conciergeriepme.fr/ pointe vers http://ns358756.ovh.net/.
Cerise sur le gâteau, les autres domaines configurés sur le serveur fonctionnent normalement avec ou sans le vhost default activé ! Bref, je n'y comprends plus rien :o. Donc si un expert en config d'Apache passe par là, son aide sera la bien venue !
Ci-dessous la configuration actuelle de mon serveur Apache :
Les liens symboliques vers les répertoires de travail :
Les répertoires de travail :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 root@ns358756:/var/www# ls -a -l total 12 drwxr-xr-x 2 root root 4096 mars 1 20:01 . drwxr-xr-x 14 root root 4096 févr. 28 00:33 .. lrwxrwxrwx 1 root root 26 mai 4 2014 cgiepme -> /home/fulbert/www/cgiepme lrwxrwxrwx 1 root root 22 nov. 10 2013 cpa -> /home/fulbert/www/cpa lrwxrwxrwx 1 root root 22 nov. 10 2013 fea -> /home/fulbert/www/fea lrwxrwxrwx 1 root root 22 mai 4 2014 map -> /home/fulbert/www/map lrwxrwxrwx 1 root root 22 nov. 9 2013 ppa -> /home/fulbert/www/ppa lrwxrwxrwx 1 root root 23 nov. 6 2013 ppa1 -> /home/fulbert/www/ppa1 -rw-r--r-- 1 root root 26 mars 1 00:07 robots.txt lrwxrwxrwx 1 root root 18 mars 1 20:01 www -> /home/fulbert/www
Les sites-enabled :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 root@ns358756:/home/fulbert/www# ls -a -l total 40 drwxr-sr-x 8 fulbert www-data 4096 mars 1 18:05 . drwxr-xr-x 4 fulbert fulbert 4096 mars 1 19:16 .. drwxrwxr-x 18 fulbert www-data 4096 mai 5 2014 cgiepme drwxrwxr-x 21 fulbert www-data 4096 juil. 23 2014 cpa drwxrwxr-x 21 fulbert www-data 4096 juil. 23 2014 fea -rw-r--r-- 1 fulbert www-data 51 mars 1 17:59 #.htaccess -r--r--r-- 1 fulbert www-data 0 févr. 28 08:58 index.html drwxrwxr-x 18 fulbert www-data 4096 mai 5 2014 map dr-xr-xr-x 46 fulbert www-data 4096 nov. 11 2013 ppa drwxr-xr-x 45 fulbert www-data 4096 févr. 28 03:15 ppa1 -r--r--r-- 1 fulbert www-data 28 mars 1 00:04 robots.txt
Le fichier de config du vhost www.conciergeriepme.fr :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 root@ns358756:/etc/apache2/sites-enabled# ls -a -l total 8 drwxr-xr-x 2 root root 4096 mars 2 06:04 . drwxr-xr-x 7 root root 4096 févr. 28 00:54 .. lrwxrwxrwx 1 root root 41 mars 2 05:57 www.conciergeriepme.fr -> ../sites-available/www.conciergeriepme.fr lrwxrwxrwx 1 root root 51 nov. 10 2013 www.coursparticulierallemand.com -> ../sites-available/www.coursparticulierallemand.com lrwxrwxrwx 1 root root 46 nov. 10 2013 www.formationenallemand.com -> ../sites-available/www.formationenallemand.com lrwxrwxrwx 1 root root 50 mai 4 2014 www.monassistantepersonnelle.fr -> ../sites-available/www.monassistantepersonnelle.fr lrwxrwxrwx 1 root root 50 nov. 9 2013 www.profparticulierallemand.com -> ../sites-available/www.profparticulierallemand.com
Le fichier de config du vhost default :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 <VirtualHost *:80> ServerAdmin webmaster@concergieriepme.fr ServerName www.concergieriepme.fr ServerAlias concergieriepme.fr DocumentRoot /var/www/cgiepme <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /var/www/cgiepme> Options -Indexes FollowSymLinks MultiViews AllowOverride All Order Allow,Deny Allow from all </Directory> ## ZONE CGIEPME Alias /cgiepme /home/fulbert/www/cgiepme <Directory /home/fulbert/www/cgiepme> Options -Indexes +FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/concergieriepme.fr-error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/concergieriepme.fr-access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64 <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName ns358756.ovh.net DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> ErrorDocument 403 "http://ns358756.ovh.net/www/" Options -Indexes FollowSymLinks MultiViews AllowOverride None Order Deny,Allow Deny from all Allow from 127.0.0.1 # local Allow from [Mon IP Freebox] </Directory> ## ZONE PUBLIQUE ErrorDocument 403 "http://ns358756.ovh.net/www/" Alias /www /home/fulbert/www <Directory /home/fulbert/www> Options -Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from localhost ip6-localhost Allow from 127.0.0.1 Allow from [Mon IP Freebox] </Location> </VirtualHost>
Partager