经查
加上了<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Satisfy all
</Directory>但是仍然跑不起来……

解决方案 »

  1.   

    各个站点的各自的.htaccess呢?
      

  2.   

    嗯 需要重写的 站点 目录下面是有.htaccess的难道.htaccess里 还要写明路径嘛?!
      

  3.   


    # prefork MPM
    # StartServers: number of server processes to start
    # MinSpareServers: minimum number of server processes which are kept spare
    # MaxSpareServers: maximum number of server processes which are kept spare
    # MaxClients: maximum number of server processes allowed to start
    # MaxRequestsPerChild: maximum number of requests a server process serves
    <IfModule mpm_prefork_module>
        StartServers          5
        MinSpareServers       5
        MaxSpareServers      10
        MaxClients          150
        MaxRequestsPerChild   0
    </IfModule># ThreadsPerChild: constant number of worker threads in the server process
    # MaxRequestsPerChild: maximum  number of requests a server process serves
    #ThreadsPerChild 250
    MaxRequestsPerChild  0#ServerRoot "D:/AppServ/Apache2.2"prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
    #
    #Listen 12.34.56.78:80
    Listen 80
    LoadModule actions_module modules/mod_actions.so
    LoadModule alias_module modules/mod_alias.so
    LoadModule asis_module modules/mod_asis.so
    LoadModule auth_basic_module modules/mod_auth_basic.so
    #LoadModule auth_digest_module modules/mod_auth_digest.so
    #LoadModule authn_anon_module modules/mod_authn_anon.so
    #LoadModule authn_dbm_module modules/mod_authn_dbm.so
    LoadModule authn_default_module modules/mod_authn_default.so
    LoadModule authn_file_module modules/mod_authn_file.so
    #LoadModule authz_dbm_module modules/mod_authz_dbm.so
    LoadModule authz_default_module modules/mod_authz_default.so
    LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
    LoadModule authz_host_module modules/mod_authz_host.so
    LoadModule authz_user_module modules/mod_authz_user.so
    LoadModule autoindex_module modules/mod_autoindex.so
    #LoadModule cern_meta_module modules/mod_cern_meta.so
    LoadModule cgi_module modules/mod_cgi.so
    #LoadModule dav_module modules/mod_dav.so
    #LoadModule dav_fs_module modules/mod_dav_fs.so
    #LoadModule deflate_module modules/mod_deflate.so
    LoadModule dir_module modules/mod_dir.so
    LoadModule env_module modules/mod_env.so
    #LoadModule expires_module modules/mod_expires.so
    #LoadModule file_cache_module modules/mod_file_cache.so
    #LoadModule headers_module modules/mod_headers.so
    LoadModule imagemap_module modules/mod_imagemap.so
    LoadModule include_module modules/mod_include.so
    #LoadModule info_module modules/mod_info.so
    LoadModule isapi_module modules/mod_isapi.so
    LoadModule log_config_module modules/mod_log_config.so
    LoadModule mime_module modules/mod_mime.so
    #LoadModule mime_magic_module modules/mod_mime_magic.so
    #LoadModule proxy_module modules/mod_proxy.so
    #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
    #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
    #LoadModule proxy_connect_module modules/mod_proxy_connect.so
    #LoadModule proxy_http_module modules/mod_proxy_http.so
    #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
    LoadModule negotiation_module modules/mod_negotiation.so
    LoadModule rewrite_module modules/mod_rewrite.so
    LoadModule setenvif_module modules/mod_setenvif.so
    #LoadModule speling_module modules/mod_speling.so
    #LoadModule status_module modules/mod_status.so
    #LoadModule unique_id_module modules/mod_unique_id.so
    LoadModule userdir_module modules/mod_userdir.so
    #LoadModule usertrack_module modules/mod_usertrack.so
    #LoadModule vhost_alias_module modules/mod_vhost_alias.so
    #LoadModule ssl_module modules/mod_ssl.so
    LoadModule php5_module D:/AppServ/php5/php5apache22h.dllServerAdmin [email protected] localhost:80#
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    #
    DocumentRoot "D:/AppServ/www"#
    # Each directory to which Apache has access can be configured with respect
    # to which services and features are allowed and/or disabled in that
    # directory (and its subdirectories). 
    #
    # First, we configure the "default" to be a very restrictive set of 
    # features.  
    #
    <Directory />
    Options FollowSymLinks
    AllowOverride All
    </Directory>
    #
    # This should be changed to whatever you set DocumentRoot to.
    #
    <Directory "D:/AppServ/www">    Options Indexes FollowSymLinks MultiViews ExecCGI    AllowOverride All    #
        # Controls who can get stuff from this server.
        #
        Order allow,deny
        Allow from all</Directory>#
    # DirectoryIndex: sets the file that Apache will serve if a directory
    # is requested.
    #
    <IfModule dir_module>
        DirectoryIndex index.php index.html index.htm
    </IfModule>#
    # The following lines prevent .htaccess and .htpasswd files from being 
    # viewed by Web clients. 
    #
    <FilesMatch "^\.ht">
        Order allow,deny
        Deny from all
    </FilesMatch>ErrorLog logs/error.log
    LogLevel warn<IfModule log_config_module>
        #
        # The following directives define some format nicknames for use with
        # a CustomLog directive (see below).
        #
        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
        LogFormat "%h %l %u %t \"%r\" %>s %b" common    <IfModule logio_module>
          # You need to enable mod_logio.c to use %I and %O
          LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
        </IfModule>    CustomLog logs/access.log common
        #CustomLog logs/access.log combined
    </IfModule><IfModule alias_module>    ScriptAlias /cgi-bin/ "D:/AppServ/www/cgi-bin/"</IfModule>#
    # "D:/AppServ/www/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    #
    #<Directory "D:/AppServ/www/cgi-bin">
    #    Options FollowSymLinks
    #    AllowOverride All
    #    Order allow,deny
    #    Allow from all
    #</Directory>DefaultType text/plain<IfModule mime_module></IfModule><IfModule mod_php5.c>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php-source .phps
    </IfModule>
    #ErrorDocument 402 http://www.example.com/subscription_info.html
    ##EnableMMAP off
    #EnableSendfile off
    # Server-pool management (MPM specific)
    #Include conf/extra/httpd-mpm.conf# Multi-language error messages
    #Include conf/extra/httpd-multilang-errordoc.conf# Fancy directory listings
    #Include conf/extra/httpd-autoindex.conf# Language settings
    #Include conf/extra/httpd-languages.conf# User home directories
    #Include conf/extra/httpd-userdir.conf# Real-time info on requests and configuration
    #Include conf/extra/httpd-info.conf# Virtual hosts
    #Include conf/extra/httpd-vhosts.conf# Local access to the Apache HTTP Server Manual
    #Include conf/extra/httpd-manual.conf# Distributed authoring and versioning (WebDAV)
    #Include conf/extra/httpd-dav.conf# Various default settings
    #Include conf/extra/httpd-default.conf<IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    </IfModule>
    Include D:/AppServ/Apache2.2/conf/default/httpd-autoindex.conf
    Include D:/AppServ/Apache2.2/conf/default/httpd-default.conf
      

  4.   

    httpd.conf
    基本上就是上面这样
    我去掉了一些注解
    麻烦大家帮忙看下 
    多谢了
      

  5.   

    在httpd.conf中找到,DirectoryIndex 后面写上你想设置为首页的文件名,如:index.html index.htm index.php等
     
    要使这些配置生效需要重新启动apache
     
    2. 安装配置php5
     
    解压缩PHP压缩包到C:\php5(这个路径可以随意,不过以下要是用到这个路径,请相应的修改)。
      把C:\php5下的php.ini-dist改名为php.ini后再复制到C:\windows 然后修改几个地方:
    extension_dir = "C:\php5\ext" (指定动态连接库的目录,php5和php4不同的地方就是它的动态连接库目录变了,这在它的文档结构里有详细的说明)
    然后把下面几句前面的分号去掉
    ;extension=php_dba.dll
    ;extension=php_dbase.dll
    ;extension=php_gd2.dll
    ;extension=php_imap.dll
    ;extension=php_mbstring.dll
    ;extension=php_mcrypt.dll
    ;extension=php_mysql.dll
    即改为:
    extension=php_dba.dll
    extension=php_dbase.dll
    extension=php_gd2.dll
    extension=php_imap.dll
    extension=php_mbstring.dll
    extension=php_mcrypt.dll
    extension=php_mysql.dll
    刚才修改extension_dir = "C:\php5\ext"就是为了使php能正确的找到这些模块。
     
    接下来一点很重要的就是把C:\php5目录下的 libmysql.dll php5ts.dll  php5apache2.dll libmcrypt.dll 和C:\php5\ext目录下的 php_mysql.dll php_mysqli.dll 复制到windows/system32下,如果不这样做,mysql动态连接库就无法正常加载。
    不要把 php_mysql.dll 和 php_mssql.dll 混淆
    如果没有加载 php_gd2.dll  php将不能处理图像.没有加载php_mysql.dll php将不支持mysql函数库
    php_mbstring.dll在后面使用phpmyadmin时支持宽字符 接下来修改了一些文件上传以及内存使用最大限制:(改不改都行)
    memory_limit = 20M
    post_max_size = 20M
    upload_max_filesize = 20M
     修改过php.ini以后也要重新启动apache
      

  6.   

    重启了apache没有?你的思路是对的.但还有个.htaccess什么文件需要写一些规则,自己找资料看一下吧.apache手册上写的很详细啊.
    看看你的文件夹下那个扩展在不在.没有去下一个.
      

  7.   

    先感谢8楼朋友的回复
    我每修改次httpd.conf 就会重新启动一次阿帕奇
    我.htaccess没有问题的
    因为服务器上的环境是没问题的
    我把所有文件放服务器上 能进行伪静态但是我本地的……我没配置好……所以不能
      

  8.   

    突然想起一件事
    是不是因为我在根目录下面还放置了
    httpd.ini呢?删了就好了吧……
    晚上回去试试!