Bonjour,

Je suis actuellement avec fedora 21.

Je souhaite réalisé un serveur de cartes. Pour cela, j'ai installé les logiciels QGIS et MAPSERVER-QGIS. J'ai activé le serveur web apache et le paquet lighttpd-fastcgi.
Par rapport au différentes lectures que j'ai eu, j'ai créé un projet avec QGIS. j'ai créé un répertoire cgi-bin et j'y ai créé des liens symboliques pour qgis_mapserv.fcgi, wms_metadata.xml et mon projet QGIS. J'ai démarré le serveur apache. Il fonctionne car j'ai la page "Fedora Test Page" quand je tape l'adresse IP local de mon ordinateur dans un navigateur internet ou sur un ordinateur de mon réseau local.

Par contre, quand je tape "http://http://192.168.1.12/home/parents/cgi-bin/qgis_mapserv.fcgi" j'obtiens "The requested URL /home/parents/cgi-bin/qgis_mapserv.fcgi was not found on this server."

J'ai lu qu'il fallait autoriser le module CGI avec la commande "a2enmod cgid" mais je ne sais pas comment la lancer.

Merci de votre aide.
les-jj wrote:Bonjour,

Par contre, quand je tape "http://http://192.168.1.12/home/parents/cgi-bin/qgis_mapserv.fcgi" j'obtiens "The requested URL /home/parents/cgi-bin/qgis_mapserv.fcgi was not found on this server."
Merci de votre aide.
j'espère que c'est une faute de frappe car avec deus fois http:// il ne risque pas d'y arriver.
/home/parents/cgi-bin/ est un sous dossier de /var/www/html/ ?
J'ai l'impression que tu essaies d'accéder au répertoire /home du système... ce que apache ne permet pas, sauf configuration particulière

Gérard
Bonjour,

Ces sous-dossiers ne sont pas dans /var/www/html.
J'ai créé, dans /var/www/html, les liens symboliques pour qgis_mapserv.fcgi, wms_metadata.xml et mon projet QGIS. Quand je tape "http://192.168.1.12/var/www/html/qgis_mapserv.fcgi" dans mon navigateur, j'ai la même erreur.
J'ai trouvé un trouvé également un répertoire /var/www//cgi-bin. J'ai également créé ces liens symboliques mais j'ai toujours cette erreur.
Que faut-il faire pour lancer le composant qgis_mapserv.fcgi?
ok, Selinux est-il actif ? Comment sont gérés les droits ?
Commence par mettre un simple fichier html dans le dossier voulu pour voir si tu y accèdes. Un petit tour sur
http://doc.fedora-fr.org/wiki/Installation_et_configuration_d'Apache
te donneras sans doute les solutions.
Regarde les log de /var/log/httpd/, ils sont assez explicites.
N'utilisant jamais les cgi, je ne pourrais t'aider de ce coté.
Gérard
9 jours plus tard
Bonjour,

J'ai lu la page conseillé.
Quand je contrôle ma nouvelle configuration j'obtiens :
[root@tiramisu parents]# apachectl configtest
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::221:85ff:fe36:8df. Set the 'ServerName' directive globally to suppress this message
Syntax OK
alors que dans la page HTML, je devrais obtenir que :
[root@tiramisu parents]# apachectl configtest
Syntax OK
.
Que faut-il faire?

De plus, j'ai des fichiers de .conf dans le répertoire /etc/httpd/conf.d, en particulier qgis.mapserver.conf dont le contenu est :
[root@tiramisu conf.d]# cat qgis-mapserver.conf
# This configuration is intended as an example.
# It is not meant for productive use.

RewriteEngine on
RewriteRule ^/wms/(.+)$ /qgis/qgis_mapserv.fcgi?map=/var/www/wms/$1.qgs [QSA,PT]

ScriptAlias /qgis/ "/usr/libexec/qgis/"


<Directory "/usr/libexec/qgis/">

  Options ExecCGI
  Options FollowSymLinks
  
  <IfModule mod_authz_core.c>
     # Apache 2.4
     Require local
   </IfModule>
   
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order deny,allow
     Deny from all
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>

</Directory>
[root@tiramisu conf.d]# 
Est-ce que cette configuration permet d'obtenir un serveur? Si oui quelle est son lien pour le lancer à partir d'un navigateur Internet?
En complément de mon post précédent, j'ai modifié mon fichier hosts dans lequel j'ai ajouté la dernière ligne.
[root@tiramisu etc]# cat hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1   tiramisu site1 site2 site3  localhost.localdomain localhost
Quand je contrôle mon serveur apache j'obtiens
[root@tiramisu etc]# apachectl configtest
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
Le nom de ma machine est tiramisu, je ne sais pas si cela change quelques chose.

Voilà ce que j'ai dans mes fichiers de log
[root@tiramisu httpd]# cat access_log
192.168.1.12 - - [21/Dec/2015:11:03:17 +0100] "GET /cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities HTTP/1.1" 403 234 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
192.168.1.12 - - [21/Dec/2015:11:03:17 +0100] "GET /favicon.ico HTTP/1.1" 404 209 "http://192.168.1.12/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
192.168.1.12 - - [21/Dec/2015:11:04:08 +0100] "-" 408 - "-" "-"
192.168.1.12 - - [21/Dec/2015:11:04:53 +0100] "GET /home/parents/QGIS/serveur/49/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities HTTP/1.1" 404 248 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
192.168.1.12 - - [21/Dec/2015:11:10:15 +0100] "GET / HTTP/1.1" 403 4609 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
192.168.1.12 - - [21/Dec/2015:11:10:15 +0100] "GET /icons/apache_pb2.gif HTTP/1.1" 200 4234 "http://192.168.1.12/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
192.168.1.12 - - [21/Dec/2015:11:10:15 +0100] "GET /icons/poweredby.png HTTP/1.1" 200 2811 "http://192.168.1.12/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
192.168.1.12 - - [21/Dec/2015:11:11:06 +0100] "-" 408 - "-" "-"
192.168.1.12 - - [21/Dec/2015:11:22:00 +0100] "GET / HTTP/1.1" 403 4609 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
192.168.1.12 - - [21/Dec/2015:11:22:00 +0100] "GET /favicon.ico HTTP/1.1" 404 209 "http://192.168.1.12/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
192.168.1.12 - - [21/Dec/2015:11:22:12 +0100] "GET /QGIS HTTP/1.1" 404 202 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
192.168.1.12 - - [21/Dec/2015:11:23:03 +0100] "-" 408 - "-" "-"
192.168.1.12 - - [21/Dec/2015:11:23:03 +0100] "-" 408 - "-" "-"
192.168.1.12 - - [21/Dec/2015:11:23:03 +0100] "-" 408 - "-" "-"
::1 - - [21/Dec/2015:11:42:25 +0100] "GET /cgi-bin/qgis_mapserv.fcgi HTTP/1.1" 403 234 "http://live.osgeo.org/fr/quickstart/qgis_mapserver_quickstart.html" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
::1 - - [21/Dec/2015:11:42:25 +0100] "GET /favicon.ico HTTP/1.1" 404 209 "http://localhost/cgi-bin/qgis_mapserv.fcgi" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
192.168.1.12 - - [21/Dec/2015:11:42:40 +0100] "GET /cgi-bin/qgis_mapserv.fcgi HTTP/1.1" 403 234 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
127.0.0.1 - - [21/Dec/2015:11:42:50 +0100] "GET /cgi-bin/qgis_mapserv.fcgi HTTP/1.1" 403 234 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
127.0.0.1 - - [21/Dec/2015:11:42:51 +0100] "GET /favicon.ico HTTP/1.1" 404 209 "http://tiramisu/cgi-bin/qgis_mapserv.fcgi" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"
::1 - - [21/Dec/2015:12:24:57 +0100] "-" 408 - "-" "-"
::1 - - [21/Dec/2015:12:24:57 +0100] "-" 408 - "-" "-"
et
[root@tiramisu httpd]# cat error_log
[Mon Dec 21 10:42:24.223120 2015] [suexec:notice] [pid 22053] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::221:85ff:fe36:8df. Set the 'ServerName' directive globally to suppress this message
[Mon Dec 21 10:42:24.627627 2015] [auth_digest:notice] [pid 22053] AH01757: generating secret for digest authentication ...
[Mon Dec 21 10:42:24.628514 2015] [lbmethod_heartbeat:notice] [pid 22053] AH02282: No slotmem from mod_heartmonitor
[Mon Dec 21 10:42:25.031787 2015] [mpm_prefork:notice] [pid 22053] AH00163: Apache/2.4.16 (Fedora) mod_fcgid/2.3.9 mod_wsgi/4.4.1 Python/2.7.8 configured -- resuming normal operations
[Mon Dec 21 10:42:25.031884 2015] [core:notice] [pid 22053] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Dec 21 10:43:35.550220 2015] [mpm_prefork:notice] [pid 22053] AH00170: caught SIGWINCH, shutting down gracefully
[Mon Dec 21 10:43:37.384334 2015] [suexec:notice] [pid 22342] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::221:85ff:fe36:8df. Set the 'ServerName' directive globally to suppress this message
[Mon Dec 21 10:43:37.460744 2015] [auth_digest:notice] [pid 22342] AH01757: generating secret for digest authentication ...
[Mon Dec 21 10:43:37.461614 2015] [lbmethod_heartbeat:notice] [pid 22342] AH02282: No slotmem from mod_heartmonitor
[Mon Dec 21 10:43:38.118987 2015] [mpm_prefork:notice] [pid 22342] AH00163: Apache/2.4.16 (Fedora) mod_fcgid/2.3.9 mod_wsgi/4.4.1 Python/2.7.8 configured -- resuming normal operations
[Mon Dec 21 10:43:38.119078 2015] [core:notice] [pid 22342] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Dec 21 11:03:17.399228 2015] [core:error] [pid 22516] [client 192.168.1.12:49698] AH00037: Symbolic link not allowed or link target not accessible: /var/www/cgi-bin/qgis_mapserv.fcgi
[Mon Dec 21 11:10:15.075320 2015] [autoindex:error] [pid 22516] [client 192.168.1.12:49802] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Mon Dec 21 11:22:00.876604 2015] [autoindex:error] [pid 22513] [client 192.168.1.12:49955] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Mon Dec 21 11:42:25.101580 2015] [core:error] [pid 22513] [client ::1:60116] AH00037: Symbolic link not allowed or link target not accessible: /var/www/cgi-bin/qgis_mapserv.fcgi, referer: http://live.osgeo.org/fr/quickstart/qgis_mapserver_quickstart.html
[Mon Dec 21 11:42:40.722360 2015] [core:error] [pid 23244] [client 192.168.1.12:50182] AH00037: Symbolic link not allowed or link target not accessible: /var/www/cgi-bin/qgis_mapserv.fcgi
[Mon Dec 21 11:42:50.739646 2015] [core:error] [pid 22531] [client 127.0.0.1:40465] AH00037: Symbolic link not allowed or link target not accessible: /var/www/cgi-bin/qgis_mapserv.fcgi
J'ai également essayé de configurer SELinux et apache en faisant
[root@tiramisu httpd]# restorecon -R -v /var/www/html
[root@tiramisu httpd]# setsebool -P httpd_enable_homedirs 1
setsebool:  SELinux is disabled.
mais je n'ai toujours pas de résultat.
les-jj wrote:En complément de mon post précédent, j'ai modifié mon fichier hosts dans lequel j'ai ajouté la dernière ligne.

Le nom de ma machine est tiramisu, je ne sais pas si cela change quelques chose.

Voilà ce que j'ai dans mes fichiers de log
[root@tiramisu httpd]# cat error_log
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::221:85ff:fe36:8df. Set the 'ServerName' directive globally to suppress this message
...
[Mon Dec 21 11:03:17.399228 2015] [core:error] [pid 22516] [client 192.168.1.12:49698] AH00037: Symbolic link not allowed or link target not accessible: /var/www/cgi-bin/qgis_mapserv.fcgi
[Mon Dec 21 11:10:15.075320 2015] [autoindex:error] [pid 22516] [client 192.168.1.12:49802] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Mon Dec 21 11:22:00.876604 2015] [autoindex:error] [pid 22513] [client 192.168.1.12:49955] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Mon Dec 21 11:42:25.101580 2015] [core:error] [pid 22513] [client ::1:60116] AH00037: Symbolic link not allowed or link target not accessible: /var/www/cgi-bin/qgis_mapserv.fcgi, referer: http://live.osgeo.org/fr/quickstart/qgis_mapserver_quickstart.html
[Mon Dec 21 11:42:40.722360 2015] [core:error] [pid 23244] [client 192.168.1.12:50182] AH00037: Symbolic link not allowed or link target not accessible: /var/www/cgi-bin/qgis_mapserv.fcgi
[Mon Dec 21 11:42:50.739646 2015] [core:error] [pid 22531] [client 127.0.0.1:40465] AH00037: Symbolic link not allowed or link target not accessible: /var/www/cgi-bin/qgis_mapserv.fcgi
que renvoie la commande
$ hostname
les dernières lignes sont explicites : il n'y a pas de fichier index dans /var/www/html/ donc inaccessible
et problème sur le cgi mais comme je ne connais ni les cgi ni qgis, je ne pourrai t'aider
Désolé

Gérard
Cette commande renvoie:
[root@tiramisu httpd]# hostname
tiramisu
J'ai copier des fichiers dans le répertoire html
[root@tiramisu html]# ls
favicon.ico  index.html  light_button.png  light_logo.png  poweredby.png.
Quand je tape "tiramisu" dans la barre adresse d'un navigateur Internet, j'ai la même page que lorsque j'ouvre le fichier index.html.
Par contre lorsque je contrôle mon serveur, j'ai toujours le même message :
[root@tiramisu html]# apachectl configtest
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
De plus a quoi servent les fichiers de .conf dans le répertoire /etc/httpd/conf.d?
J'ai essayé de configurer un site perso.

Pour cela, j'ai créé un fichier a.conf qui est :
[root@tiramisu conf.d]# cat a.conf
# activation des hôtes virtuels
NameVirtualHost tiramisu:80

# Hôte virtuel par défaut
<VirtualHost tiramisu:80>

         # Activation des sites de quelques utilisateurs : http://localhost/~nomutilisateur
         UserDir  enabled  parents
         UserDir  public_html
        <Directory /home/*/public_html>
                AllowOverride all
                Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        </Directory>


         # Activation de l'adresse  : http://localhost/server-status
        <Location /server-status>
                SetHandler server-status
                Order deny,allow
                Deny from all
                Allow from 127.0.0.1
                Allow from ::1
        </Location>

         # Activation de l'adresse  : http://localhost/server-info
        <Location /server-info>
                SetHandler server-info
                Order deny,allow
                Deny from all
                Allow from 127.0.0.1
                Allow from ::1
        </Location>

</VirtualHost>
<VirtualHost tiramisu:80>
        # home du site : URL = http://lighttpd/
        ServerName   lighttpd

        # Dossier contenant les pages
        DocumentRoot /var/www/lighttpd

        <Directory /var/www/lighttpd>
                Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
                AllowOverride FileInfo AuthConfig Limit
        </Directory>

        # jeu de caractères (UTF-8 par défaut)
        AddDefaultCharset ISO-8859-1
</VirtualHost>
En tapant "http://lighttpd/" dans mon navigateur sur , j'accède à mon site. Comment y accéder depuis un ordinateur de mon réseau local?

Quand je fais un contrôle, j'ai le résultat suivant
[root@tiramisu www]# apachectl configtest
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf.d/a.conf:2
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
Comment résoudre ce problème?

Merci
Qu'est ce que tu n'as pas compris dans:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
?
Comment faire pour déterminer le 'ServerName' pour supprimer ce message?
au hasard regarde dans la page ici

Pour info il m'a fallu une minute pour la trouver.