再补充一下我刚装的PHPTriad2-11.
当默认首页不存在时就把目录和文件都显示出来了.

解决方案 »

  1.   

    #--httpd.conf--
    <Directory "C:/apache1.3.22/htdocs">
        Options All
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
    #我的安装路径是c:\Apache 1.3.22
      

  2.   

    在DocumentRoot的下面不远,会有这样几行:
    #
    # This should be changed to whatever you set DocumentRoot to.
    #
    <Directory "x:/xxxx/Apache/htdocs">强烈建议大家把这里改成
    <Directory "x:/xxxx/Apache/?????">?????的名字任由大家选,但不要选Apache下面有的目录名!如果像原来那样,htdocs就能被列出目录列表。
      

  3.   

    谁详细说下好吗?现将httpd.conf去掉注释后贴出,装完PHPTriad2-11后
    未改动的.路径c:\apache 请告诉我怎么改,并在那里做出注释.解决后
    定另有100分相送.TO Mistruster(弱智d):
      我按你说的试了一下,仍不行.可能我做的不对吧.  #--httpd.conf--
    ServerType standaloneServerRoot "/apache"PidFile logs/httpd.pidScoreBoardFile logs/apache_runtime_statusTimeout 300KeepAlive OnMaxKeepAliveRequests 100KeepAliveTimeout 15MaxRequestsPerChild 0ThreadsPerChild 50Port 80ServerAdmin [email protected] localhostDocumentRoot "/apache/htdocs"<Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory><Directory "/apache/htdocs">    Options Indexes FollowSymLinks MultiViews ExecCGI    AllowOverride None    Order allow,deny
        Allow from all
    </Directory><IfModule mod_userdir.c>
        UserDir "/apache/users/"
    </IfModule><IfModule mod_dir.c>
        DirectoryIndex index.html
        DirectoryIndex index.htm
        DirectoryIndex index.php
        DirectoryIndex index.php3
        DirectoryIndex default.html
        DirectoryIndex default.htm</IfModule>AccessFileName .htaccess<Files ~ "^\.ht">
        Order allow,deny
        Deny from all
    </Files>UseCanonicalName On<IfModule mod_mime.c>
        TypesConfig conf/mime.types
    </IfModule>DefaultType text/plain<IfModule mod_mime_magic.c>
        MIMEMagicFile conf/magic
    </IfModule>HostnameLookups OffErrorLog logs/error.logLogLevel warnLogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agentCustomLog logs/access.log commonServerSignature On<IfModule mod_alias.c>    Alias /icons/ "/apache/icons/"    <Directory "/apache/icons">
            Options Indexes MultiViews
            AllowOverride None
            Order allow,deny
            Allow from all
        </Directory>
       
        ScriptAlias /cgi-bin/ "/apache/cgi-bin/"
        ScriptAlias /php/ "/apache/php/" 
       
        <Directory "/apache/cgi-bin">
            AllowOverride None
            Options None
            Order allow,deny
            Allow from all
        </Directory></IfModule><IfModule mod_autoindex.c>
       
        IndexOptions FancyIndexing
        
        AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip    AddIconByType (TXT,/icons/text.gif) text/*
        AddIconByType (IMG,/icons/image2.gif) image/*
        AddIconByType (SND,/icons/sound2.gif) audio/*
        AddIconByType (VID,/icons/movie.gif) video/*    AddIcon /icons/binary.gif .bin .exe
        AddIcon /icons/binhex.gif .hqx
        AddIcon /icons/tar.gif .tar
        AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
        AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
        AddIcon /icons/a.gif .ps .ai .eps
        AddIcon /icons/layout.gif .html .shtml .htm .pdf
        AddIcon /icons/text.gif .txt
        AddIcon /icons/c.gif .c
        AddIcon /icons/p.gif .pl .py
        AddIcon /icons/f.gif .for
        AddIcon /icons/dvi.gif .dvi
        AddIcon /icons/uuencoded.gif .uu
        AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
        AddIcon /icons/tex.gif .tex
        AddIcon /icons/bomb.gif core    AddIcon /icons/back.gif ..
        AddIcon /icons/hand.right.gif README
        AddIcon /icons/folder.gif ^^DIRECTORY^^
        AddIcon /icons/blank.gif ^^BLANKICON^^
        
        DefaultIcon /icons/unknown.gif
        
        ReadmeName README
        HeaderName HEADER
        
        IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t</IfModule><IfModule mod_mime.c>    AddEncoding x-compress Z
        AddEncoding x-gzip gz tgz
        
        AddLanguage da .dk
        AddLanguage nl .nl
        AddLanguage en .en
        AddLanguage et .ee
        AddLanguage fr .fr
        AddLanguage de .de
        AddLanguage el .el
        AddLanguage he .he
        AddCharset ISO-8859-8 .iso8859-8
        AddLanguage it .it
        AddLanguage ja .ja
        AddCharset ISO-2022-JP .jis
        AddLanguage kr .kr
        AddCharset ISO-2022-KR .iso-kr
        AddLanguage no .no
        AddLanguage pl .po
        AddCharset ISO-8859-2 .iso-pl
        AddLanguage pt .pt
        AddLanguage pt-br .pt-br
        AddLanguage ltz .lu
        AddLanguage ca .ca
        AddLanguage es .es
        AddLanguage sv .se
        AddLanguage cz .cz
        AddLanguage ru .ru
        AddLanguage tw .tw
        AddCharset Big5         .Big5    .big5
        AddCharset WINDOWS-1251 .cp-1251
        AddCharset CP866        .cp866
        AddCharset ISO-8859-5   .iso-ru
        AddCharset KOI8-R       .koi8-r
        AddCharset UCS-2        .ucs2
        AddCharset UCS-4        .ucs4
        AddCharset UTF-8        .utf8    <IfModule mod_negotiation.c>
            LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
        </IfModule>    AddType application/x-httpd-php .php
        AddType application/x-httpd-php .php3
        AddType application/x-httpd-php .php4
        AddType application/x-httpd-php-source .phps
        AddType application/x-tar .tgz
        
        AddHandler cgi-script .cgi
        AddHandler cgi-script .pl
        
    </IfModule>Action application/x-httpd-php /php/php.exe<IfModule mod_setenvif.c>    BrowserMatch "Mozilla/2" nokeepalive
        BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0    BrowserMatch "RealPlayer 4\.0" force-response-1.0
        BrowserMatch "Java/1\.0" force-response-1.0
        BrowserMatch "JDK/1\.0" force-response-1.0</IfModule>
      

  4.   

    #--httpd.conf--
    ServerType standaloneServerRoot "/apache"PidFile logs/httpd.pidScoreBoardFile logs/apache_runtime_statusTimeout 300KeepAlive OnMaxKeepAliveRequests 100KeepAliveTimeout 15MaxRequestsPerChild 0ThreadsPerChild 50Port 80ServerAdmin [email protected] localhostDocumentRoot "/apache/htdocs"<Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory><Directory "/apache/htdocs">    Options Indexes FollowSymLinks MultiViews ExecCGI //这里!!
    //把Indexes去掉
    //改成Options FollowSymLinks MultiViews ExecCGI
        AllowOverride None    Order allow,deny
        Allow from all
    </Directory>
      

  5.   

    去掉IndexOptions FancyIndexing  再试试 ...
      

  6.   

    哈,好简单的问题,成功了给我分哦!
    在 httpd.conf 作一下小小的修改就可以解決了~ 首先请找到以下文字: <Directory \"你的apache安装路径\"> #
    # This may also be "None", "All", or any combination of "Indexes",
    # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    Options Indexes FollowSymLinks 
    把 Options Indexes FollowSymLinks这行改成 Options None 就可以了。 然后重启APACHE服务器,再看看http://localhost/,是不是变成了: Forbidden 
    You don\'t have permission to access / on this server. 
    -------------------------------------------------------------------------------- Apache/1.3.14 Server at localhost Port 80 --------------------------------------------------------------------------------
      

  7.   

    这个问题在大家的帮助下解决了.
    LeeMaRS(小菜虎),feyge(菲戈)的方法我都试了,都可以.所以请二位到
    http://www.csdn.net/expert/topic/595/595058.xml?temp=.5589105
    领取每人50分.