IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Apache Discussion :

[VHOSTS] Certains fonctionnent, d'autres non.


Sujet :

Apache

  1. #1
    Candidat au Club
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    4
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mars 2008
    Messages : 4
    Points : 2
    Points
    2
    Par défaut [VHOSTS] Certains fonctionnent, d'autres non.
    Bonjour,

    J'ai un petit soucis avec apache2 sur debian.

    Je ne comprend pas pourquoi certains de mes virtualhosts fonctionnent alors que d'autres non.

    Exemple :

    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
    <VirtualHost xx.xx.xx.xx:80>
    DocumentRoot /home/rep1/rep2/www
    <Directory "/home/rep1/rep2/www">
    allow from all
    Options +Indexes
    DirectoryIndex index.php
    AllowOverride All
    </Directory>
    ServerAlias www.mondomaine.com mondomaine.com
    Options ExecCGI FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews SymLinksIfOwnerMatch
    DirectoryIndex index.php index.htm index.html
    ServerSignature On
    ContentDigest on
    ServerName mondomaine.com
    </VirtualHost>
    fonctionne


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    <VirtualHost xx.xx.xx.xx:80>
    DocumentRoot "/home/rep1/forums/www"
    ServerName forums.mondomaine.com
    <Directory "/home/rep1/forums/www">
    Options +Indexes
    DirectoryIndex index.php
    AllowOverride All
    </Directory>
    Options ExecCGI FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews SymLinksIfOwnerMatch
    DirectoryIndex index.php index.htm index.html
    ServerSignature On
    ContentDigest on
    </VirtualHost>
    fonctionne aussi.

    Par contre


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    <VirtualHost xx.xx.xx.xx:80>
    DocumentRoot "/home/rep1/forum2/www"
    ServerName forum2.mondomaine.com
    <Directory "/home/rep1/forum2/www">
    Options FollowSymLinks
    DirectoryIndex index.php
    AllowOverride All
    </Directory>
    Options ExecCGI FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews SymLinksIfOwnerMatch
    DirectoryIndex index.php index.htm index.html
    ServerSignature On
    ContentDigest on
    </VirtualHost>
    et


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    <VirtualHost xx.xx.xx.xx:80>
    DocumentRoot "/home/rep1/rep2/www/document"
    ServerName document.mondomaine.com
    <Directory "/home/rep1/rep2/www/document">
    allow from all
    Options FollowSymLinks 
    AuthType Basic
    </Directory>
    DirectoryIndex index.php index.htm index.html test.htm
    </VirtualHost>
    me donnent


    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, [no address given] and inform them of the time the error occurred, and

    anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.
    :-/

    A moins que ça ne vienne pas des vhosts...
    Le premier vhost correspond à mon site internet, il y a un .htaccess
    Le second est un forum
    Le troisième est un forum protégé par un .htpassword
    Le troisième est un répertoire contenant plusieurs répertoires contenant des images affichées sur le site (par

    exemple, document.mondomaine.com/8794/imgs/3.jpg

    Je ne suis pas un expert ni de apache, ni de debian, ni de php ni du web en général, si quelqu'un pouvait m'aider,

    ça m'enlèverait une fière chandelle du pied !

    Merci !

  2. #2
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Hello,

    Peux-tu nous dire ce qu'il y a dans les logs d'erreur d'Apache (error_log), comme suggéré par le message d'erreur ? A vue de nez, y a pas d'erreur dans tes VH, ça viendrait plutôt des .htaccess.

    Du détail, du détail, du détail !!!
    Revenons à la source : lisons la documentation et les fichiers de trace, la réponse à notre problème s'y trouve sans doute

  3. #3
    Candidat au Club
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    4
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mars 2008
    Messages : 4
    Points : 2
    Points
    2
    Par défaut
    merci pour la réponse.
    Voici effectivement un extrait des logs :

    Wed Mar 05 18:15:48 2008] [error] [client 90.23.19.51] File does not exist: /home/zw/www/v3/spacer.gif, referer: http://www.zelda-world.com/v3/menuzw6.swf
    [Wed Mar 05 18:15:48 2008] [alert] [client 82.236.249.242] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://directstreet.net/index.php
    [Wed Mar 05 18:15:56 2008] [alert] [client 88.110.65.19] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/j...jockey-wii.htm
    [Wed Mar 05 18:15:56 2008] [alert] [client 88.110.65.19] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/j...jockey-wii.htm
    [Wed Mar 05 18:15:57 2008] [alert] [client 88.110.65.19] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/j...jockey-wii.htm
    [Wed Mar 05 18:15:57 2008] [alert] [client 88.110.65.19] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/j...jockey-wii.htm
    [Wed Mar 05 18:15:57 2008] [error] [client 90.23.19.51] File does not exist: /home/zw/www/v3/spacer.gif, referer: http://www.zelda-world.com/v3/index....eu=zdx&rub=gal
    [Wed Mar 05 18:15:57 2008] [alert] [client 88.110.65.19] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/j...jockey-wii.htm
    [Wed Mar 05 18:15:57 2008] [alert] [client 88.110.65.19] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/j...jockey-wii.htm
    [Wed Mar 05 18:15:57 2008] [alert] [client 88.110.65.19] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/j...jockey-wii.htm
    [Wed Mar 05 18:15:57 2008] [alert] [client 88.110.65.19] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/j...jockey-wii.htm
    [Wed Mar 05 18:15:57 2008] [alert] [client 88.110.65.19] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/j...jockey-wii.htm
    [Wed Mar 05 18:15:57 2008] [alert] [client 88.110.65.19] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/j...jockey-wii.htm
    [Wed Mar 05 18:15:57 2008] [alert] [client 88.110.65.19] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/j...jockey-wii.htm
    [Wed Mar 05 18:15:59 2008] [alert] [client 190.40.116.254] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/n...a-va-chier.htm
    [Wed Mar 05 18:15:59 2008] [alert] [client 190.40.116.254] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/n...a-va-chier.htm
    [Wed Mar 05 18:16:01 2008] [alert] [client 190.40.116.254] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/n...a-va-chier.htm
    [Wed Mar 05 18:16:01 2008] [alert] [client 190.40.116.254] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://www.nintendo-difference.com/n...a-va-chier.htm
    [Wed Mar 05 18:16:03 2008] [alert] [client 190.40.116.254] /home/nd/nintendo/www/.htaccess: Option FollowSymlinks not allowed here, referer: http://images.google.com.pe/imgres?i...DN&frame=small
    [Wed Mar 05 18:16:07 2008] [error] [client 81.64.151.187] File does not exist: /home/zw/www/v3/spacer.gif, referer: http://www.zelda-world.com/v3/index.php?dir=
    Mais du coup je ne comprends pas bien le message puisque justement j'ai l'Options FollowSymLinks dans les vhosts...

  4. #4
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Question bête : et en mettant un + devant FollowSymLinks ?
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Options +FollowSymLinks

    Du détail, du détail, du détail !!!
    Revenons à la source : lisons la documentation et les fichiers de trace, la réponse à notre problème s'y trouve sans doute

  5. #5
    Candidat au Club
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    4
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mars 2008
    Messages : 4
    Points : 2
    Points
    2
    Par défaut
    Merci,

    Je l'ai rajouté, j'ai rechargé apache et j'ai toujours cela dans mes logs.

    C'est d'autant plus étonnant que dans mon .htaccess j'ai
    Options +FollowSymlinks -indexes

  6. #6
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Y a un truc que je comprends pas : pourquoi tu utilises des <Directory> pour définir des règles sur le document root lui-même ? Ne pas les mettre devrait revenir au même :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    <VirtualHost xx.xx.xx.xx:80>
        DocumentRoot "/home/rep1/forum2/www"
        ServerName forum2.mondomaine.com
        DirectoryIndex index.php
        AllowOverride All
        Options ExecCGI FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews SymLinksIfOwnerMatch
        DirectoryIndex index.php index.htm index.html
        ServerSignature On
        ContentDigest on
    </VirtualHost>

    Du détail, du détail, du détail !!!
    Revenons à la source : lisons la documentation et les fichiers de trace, la réponse à notre problème s'y trouve sans doute

  7. #7
    Candidat au Club
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    4
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Mars 2008
    Messages : 4
    Points : 2
    Points
    2
    Par défaut
    Oui je pense aussi.
    Mais je me suis sacrément emmêlé les pinceaux avec cette histoire...

    Mais j'ai trouvé la solution :

    dans mes .htaccess, les paramètres option +indexes ou option +FollowSymlinks étaient en trop apparemment... en les enlevant, tout refonctionne parfaitement...

    Je ne sais pas pourquoi... Je dois dire que j'ai oublié de mentionner que je migrais un serveur en apache 1.3 vers apache2, donc peut être que certaines choses n'étaient pas adaptées...

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [PDF] Html2pdf - Certains pdf OK d'autres non (même script)
    Par kaching dans le forum Bibliothèques et frameworks
    Réponses: 1
    Dernier message: 02/04/2013, 14h37
  2. Un <p:commandButton fonctionne, l'autre non
    Par gabz57 dans le forum JSF
    Réponses: 3
    Dernier message: 05/09/2011, 22h21
  3. Deux serveurs sur AIX un fonctionne l'autre non
    Par karimspace dans le forum AIX
    Réponses: 4
    Dernier message: 16/05/2008, 15h26
  4. Réponses: 14
    Dernier message: 17/08/2006, 10h29
  5. [ImageMagick] Redimensionnement d'images : certaines passent, d'autres pas !
    Par p0Kep0K dans le forum Bibliothèques et frameworks
    Réponses: 3
    Dernier message: 09/02/2006, 14h08

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo