Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1921 connectés 

 


Dernière réponse
Sujet : [Apache] interface de navigation par défaut
nuitn0ire J'ai vu ceci pour integrer du php dans les pages : http://www.estvideo.com/dew/index/ [...] lumes#c357
 
J'ai fait cette méthode à la lettre pour inclure du php , j'ai pas pu me tromper , j'ai même vérifié mes droits . Non , le truc refuse catégoriquement de s'afficher . C'est simple , quand je mets en place la méthode cité plus haut , sa anule purement et simplement le code html de la mise en page .
de plus quand je vais sur HEADER.shtml => page blanche .
 
bon , je vais carrément vous donner ce que j'ai :
 
fichier httpd.conf :
 

Code :
  1. <IfModule mod_autoindex.c>
  2.     #
  3.     # FancyIndexing: whether you want fancy directory indexing or standard
  4.     #
  5.      IndexOptions FancyIndexing NameWidth=* FoldersFirst SuppressHTMLPreamble IconsAreLinks
  6.     # IndexOptions FancyIndexing VersionSort FoldersFirst HTMLTable NameWidth=* DescriptionWidth=* SuppressHTMLPreamble SuppressRules IconsAreLinks
  7.     #
  8.     # AddIcon* directives tell the server which icon to show for different
  9.     # files or filename extensions.  These are only displayed for
  10.     # FancyIndexed directories.
  11.     #
  12.     AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  13.     AddIconByType (TXT,/icons/text.gif) text/*
  14.     AddIconByType (IMG,/icons/image2.gif) image/*
  15.     AddIconByType (SND,/icons/sound2.gif) audio/*
  16.     AddIconByType (VID,/icons/movie.gif) video/*
  17.     AddIcon /icons/binary.gif .bin .exe
  18.     AddIcon /icons/binhex.gif .hqx
  19.     AddIcon /icons/tar.gif .tar
  20.     AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  21.     AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  22.     AddIcon /icons/a.gif .ps .ai .eps
  23.     AddIcon /icons/layout.gif .html .shtml .htm .pdf
  24.     AddIcon /icons/text.gif .txt
  25.     AddIcon /icons/c.gif .c
  26.     AddIcon /icons/p.gif .pl .py
  27.     AddIcon /icons/f.gif .for
  28.     AddIcon /icons/dvi.gif .dvi
  29.     AddIcon /icons/uuencoded.gif .uu
  30.     AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  31.     AddIcon /icons/tex.gif .tex
  32.     AddIcon /icons/bomb.gif core
  33.     AddIcon /icons/deb.gif .deb
  34.     AddIcon /icons/back.gif ..
  35.     AddIcon /icons/hand.right.gif README
  36.     AddIcon /icons/folder.gif ^^DIRECTORY^^
  37.     AddIcon /icons/blank.gif ^^BLANKICON^^
  38.     #
  39.     # DefaultIcon: which icon to show for files which do not have an icon
  40.     # explicitly set.
  41.     #
  42.     DefaultIcon /icons/unknown.gif
  43.     #
  44.     # AddDescription: allows you to place a short description after a file in
  45.     # server-generated indexes.  These are only displayed for FancyIndexed
  46.     # directories.
  47.     # Format: AddDescription "description" filename
  48.     #
  49.     #
  50.     # ReadmeName: the name of the README file the server will look for by
  51.     # default, and append to directory listings.
  52.     #
  53.     # HeaderName: the name of a file which should be prepended to
  54.     # directory indexes.  
  55.     #
  56.     # The module recognize only 2 kind of mime-types, text/html and
  57.     # text/*, but the only method it has to identify them is via
  58.     # the filename extension. The default is to include and display
  59.     # html files.
  60.     #
  61.     ReadmeName /README
  62.     HeaderName /HEADER.shtml
  63.     # Otherwise you can comment the 2 lines above and uncomment
  64.     # the 2 below in order to display plain text files.
  65.     #
  66.     # ReadmeName README.txt
  67.     # HeaderName HEADER.txt
  68.     #
  69.     # IndexIgnore: a set of filenames which directory indexing should ignore
  70.     # and not include in the listing.  Shell-style wildcarding is permitted.
  71.     #
  72.     IndexIgnore .??* *~ *# HEADER.html HEADER.txt RCS CVS *,v *,t
  73.     # Uncomment the following IndexIgnore line to add README.* to the file
  74.     # list that will not be displayed by mod_autoindex.
  75.     # It is not enabled by default on Debian system to permit users to properly
  76.     # browse Debian documentation (/doc/)
  77.     #
  78.     IndexIgnore README.*
  79. </IfModule>


 
mon fichier HEADER.shtml
 

Code :
  1. <!--#include virtual="HEADER.php"-->


 
mon fichier HEADER.php
 

Code :
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <title>Coldroom</title>
  6. <style type="text/css">
  7. <!--
  8. body,td,th {
  9. font-family: Arial, Helvetica, sans-serif;
  10. color: #666666;
  11. }
  12. body {
  13.   background-color: #000000;
  14. }
  15. a:link {
  16. color: #666666;
  17. text-decoration: none;
  18. }
  19. a:visited {
  20. text-decoration: none;
  21. color: #666666;
  22. }
  23. a:hover {
  24. text-decoration: underline;
  25. color: #990000;
  26. }
  27. a:active {
  28. text-decoration: none;
  29. color: #990000;
  30. }
  31. -->
  32. </style></head>
  33. <body>
  34. <table width="674" height="122" border="0">
  35. <tr>
  36. <td width="116" height="118"><img src="../logo.jpg" width="102" height="109"></td>
  37. <td width="548" align="left" valign="top"><br>
  38. <? $ip_client = (getenv("HTTP_X_FORWARD
  39. ED_FOR" ) ? getenv("HTTP_X_FORWARDED_FOR" ) : getenv("REMOTE_ADDR" )); echo "$ip_client"; ?>       </td>
  40. </tr>
  41. </table></html>


 
mon fichier README.html => n'en ai pas mis


Votre réponse
Nom d'utilisateur    Pour poster, vous devez être inscrit sur ce forum .... si ce n'est pas le cas, cliquez ici !
Le ton de votre message                        
                       
Votre réponse


[b][i][u][strike][spoiler][fixed][cpp][url][email][img][*]   
 
   [quote]
 

Options

 
Vous avez perdu votre mot de passe ?


Vue Rapide de la discussion
nuitn0ire J'ai vu ceci pour integrer du php dans les pages : http://www.estvideo.com/dew/index/ [...] lumes#c357
 
J'ai fait cette méthode à la lettre pour inclure du php , j'ai pas pu me tromper , j'ai même vérifié mes droits . Non , le truc refuse catégoriquement de s'afficher . C'est simple , quand je mets en place la méthode cité plus haut , sa anule purement et simplement le code html de la mise en page .
de plus quand je vais sur HEADER.shtml => page blanche .
 
bon , je vais carrément vous donner ce que j'ai :
 
fichier httpd.conf :
 

Code :
  1. <IfModule mod_autoindex.c>
  2.     #
  3.     # FancyIndexing: whether you want fancy directory indexing or standard
  4.     #
  5.      IndexOptions FancyIndexing NameWidth=* FoldersFirst SuppressHTMLPreamble IconsAreLinks
  6.     # IndexOptions FancyIndexing VersionSort FoldersFirst HTMLTable NameWidth=* DescriptionWidth=* SuppressHTMLPreamble SuppressRules IconsAreLinks
  7.     #
  8.     # AddIcon* directives tell the server which icon to show for different
  9.     # files or filename extensions.  These are only displayed for
  10.     # FancyIndexed directories.
  11.     #
  12.     AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  13.     AddIconByType (TXT,/icons/text.gif) text/*
  14.     AddIconByType (IMG,/icons/image2.gif) image/*
  15.     AddIconByType (SND,/icons/sound2.gif) audio/*
  16.     AddIconByType (VID,/icons/movie.gif) video/*
  17.     AddIcon /icons/binary.gif .bin .exe
  18.     AddIcon /icons/binhex.gif .hqx
  19.     AddIcon /icons/tar.gif .tar
  20.     AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  21.     AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  22.     AddIcon /icons/a.gif .ps .ai .eps
  23.     AddIcon /icons/layout.gif .html .shtml .htm .pdf
  24.     AddIcon /icons/text.gif .txt
  25.     AddIcon /icons/c.gif .c
  26.     AddIcon /icons/p.gif .pl .py
  27.     AddIcon /icons/f.gif .for
  28.     AddIcon /icons/dvi.gif .dvi
  29.     AddIcon /icons/uuencoded.gif .uu
  30.     AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  31.     AddIcon /icons/tex.gif .tex
  32.     AddIcon /icons/bomb.gif core
  33.     AddIcon /icons/deb.gif .deb
  34.     AddIcon /icons/back.gif ..
  35.     AddIcon /icons/hand.right.gif README
  36.     AddIcon /icons/folder.gif ^^DIRECTORY^^
  37.     AddIcon /icons/blank.gif ^^BLANKICON^^
  38.     #
  39.     # DefaultIcon: which icon to show for files which do not have an icon
  40.     # explicitly set.
  41.     #
  42.     DefaultIcon /icons/unknown.gif
  43.     #
  44.     # AddDescription: allows you to place a short description after a file in
  45.     # server-generated indexes.  These are only displayed for FancyIndexed
  46.     # directories.
  47.     # Format: AddDescription "description" filename
  48.     #
  49.     #
  50.     # ReadmeName: the name of the README file the server will look for by
  51.     # default, and append to directory listings.
  52.     #
  53.     # HeaderName: the name of a file which should be prepended to
  54.     # directory indexes.  
  55.     #
  56.     # The module recognize only 2 kind of mime-types, text/html and
  57.     # text/*, but the only method it has to identify them is via
  58.     # the filename extension. The default is to include and display
  59.     # html files.
  60.     #
  61.     ReadmeName /README
  62.     HeaderName /HEADER.shtml
  63.     # Otherwise you can comment the 2 lines above and uncomment
  64.     # the 2 below in order to display plain text files.
  65.     #
  66.     # ReadmeName README.txt
  67.     # HeaderName HEADER.txt
  68.     #
  69.     # IndexIgnore: a set of filenames which directory indexing should ignore
  70.     # and not include in the listing.  Shell-style wildcarding is permitted.
  71.     #
  72.     IndexIgnore .??* *~ *# HEADER.html HEADER.txt RCS CVS *,v *,t
  73.     # Uncomment the following IndexIgnore line to add README.* to the file
  74.     # list that will not be displayed by mod_autoindex.
  75.     # It is not enabled by default on Debian system to permit users to properly
  76.     # browse Debian documentation (/doc/)
  77.     #
  78.     IndexIgnore README.*
  79. </IfModule>


 
mon fichier HEADER.shtml
 

Code :
  1. <!--#include virtual="HEADER.php"-->


 
mon fichier HEADER.php
 

Code :
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <title>Coldroom</title>
  6. <style type="text/css">
  7. <!--
  8. body,td,th {
  9. font-family: Arial, Helvetica, sans-serif;
  10. color: #666666;
  11. }
  12. body {
  13.   background-color: #000000;
  14. }
  15. a:link {
  16. color: #666666;
  17. text-decoration: none;
  18. }
  19. a:visited {
  20. text-decoration: none;
  21. color: #666666;
  22. }
  23. a:hover {
  24. text-decoration: underline;
  25. color: #990000;
  26. }
  27. a:active {
  28. text-decoration: none;
  29. color: #990000;
  30. }
  31. -->
  32. </style></head>
  33. <body>
  34. <table width="674" height="122" border="0">
  35. <tr>
  36. <td width="116" height="118"><img src="../logo.jpg" width="102" height="109"></td>
  37. <td width="548" align="left" valign="top"><br>
  38. <? $ip_client = (getenv("HTTP_X_FORWARD
  39. ED_FOR" ) ? getenv("HTTP_X_FORWARDED_FOR" ) : getenv("REMOTE_ADDR" )); echo "$ip_client"; ?>       </td>
  40. </tr>
  41. </table></html>


 
mon fichier README.html => n'en ai pas mis

nuitn0ire parfaitement ce que je voulais merci à tous :)
deather2 Un pote a moi redige un tutorial sur les .htaccess justement
sub1 ben, en fait il est dit que l'entete de ta page est contenu dans le fichier HEADER et le pied de ta page dans le fichier README. Ces fichiers vont être utilisés pour créér une page web. Il faut donc que ces fichiers utilisent HTML pour présenter les données.. Il te suffit donc normalement de créer ces fichiers avec le code html nécessaire.
nuitn0ire merci
 
j'ai trouvé la doc fr de ce que tu m'as passé ainsi qu'un autre lien d'exemple (http://perso.wanadoo.fr/m.malenki/mod_autoindex/) , seulement je vois nullpart comment mettre une image de fond , ou écrire dans la partie haute ou basse de la page . Sa se fait toujours dans le module ou c'est un script exterieur ?
sub1 salut,
 
jette un oeil ici : http://httpd.apache.org/docs/mod/mod_autoindex.html
 
nuitn0ire up
nuitn0ir bon , j'ai cherché un exemple de ce que je voulais faire , et j'ai trouvé ceci . Voilà , c'est typiquement ce genre de modifs que j'aimerais pouvoir faire .
 
seulement quand je cherche un tuto sur htaccess , je tombe que sur les trucs lambda comme la gestion des utilisateurs , page 404 etc.. rien sur ce que je cherche :(
BiBi Max Il existe un petit script en php, qui se nomme JBC Explorer.
deather2 Cherche des tutos sur les .htaccess ;)
nuitn0ire Bonjour ,
 
J'ai donc apache et je voudrais savoir comment peut-on customiser sont interface d'affichage par défaut , j'entends par là , la page html qui est généré lorsque l'on fait un listing de fichier/répertoire . mettons que vous ayez votre apache de lancé , et que dans ie.. firefox , vous lanciez un http://127.0.0.1/userfile , s'il n'y a pas d'index dans userfile , il y a une page avec un listing de ce que contient le répertoire courant , on est d'accord ? et moi c'est ceci que j'aimerais un peu customiser .
Je voudrais par exemple lui donner un fond noir , avec une police particuliere , mettre aussi à la place de "Index of /userfile" (ou avec) une image en fond , pouvoir même y inserer du code php etc..
 
Bref , est-ce possible ? si oui comment ? et y a t il des tuto à ce sujet ?
 
merci !

Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)