[APAHCE]
ServerRoot "C:/Apache2"
ServerAdmin [email protected](跟这项好像没关系把)
ServerName 127.0.0.1:80
DocumentRoot "C:/Apache2/htdocs"
<Directory "C:/Apache2/htdocs">#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
    Options Indexes FollowSymLinks#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride None#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all</Directory>
UserDir "My Documents/My Website"(这项用不用改?)DirectoryIndex index.php default.php index.htm index.html default.htm default.html
Alias /icons/ "C:/Apache2/icons/"<Directory "C:/Apache2/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>#
# This should be changed to the ServerRoot/manual/.  The alias provides
# the manual, even if you choose to move your DocumentRoot.  You may comment
# this out if you do not care for the documentation.
#
Alias /manual "C:/Apache2/manual"<Directory "C:/Apache2/manual">
    Options Indexes FollowSymLinks MultiViews IncludesNoExec
    AddOutputFilter Includes html
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /php/ "C:/php/"
AddType application/x-httpd-php .php 
AddType application/x-httpd-php .php3 
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .phtml
Action application/x-httpd-php4 "/php/php.exe"
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
NameVirtualHost 127.0.0.1#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost 127.0.0.1>
    ServerAdmin [email protected]
    DocumentRoot C:/Apache2/htdocs
    ServerName Apache2
    ErrorLog c:/Apache2/logs/error_log
    CustomLog c:/Apache2/logs/access_log common
</VirtualHost>#
AddType application/x-tar .tgzAddType image/x-icon .ico

解决方案 »

  1.   

    c:\php  c:\apache好像PHP根本没发挥作用,当我输入http://localhost/index.php,如果index.php中没有php代码,则网页能显示,但网页文字不能正常显示,如果有php代码,则出现了下载框,点打开,结果运行了DREAMWEVER,真晕,请高手指教一下,谢谢!!
      

  2.   

    什么错误?配置以后有没有重启apache
      

  3.   

    安装php4步骤
    解压缩到C:\php
    复制php.ini-dest到Windows目录并改名为php.ini,复制php4ts.dll到System32目录,复制dlls目录下的所有DLL到System32目录修改Apache的配置文件,加入对PHP的支持最后重新启动Apache,用
    <?php
    phpinfo();
    ?>
    看看你的PHP是否正确
      

  4.   

    Action application/x-httpd-php "/php/php.exe"
      

  5.   

    你连接的扩展库中有很多是需要外部支持库的。请检查相应的外部支持库是否有且在正确的位置1、注释掉apache中有关php的设置,重起apache看能否进入apache的页面
    2、注释掉php.ini中的已打开的扩展,起用apache中有关php的设置。重起apache看能否执行phpinfo函数
    3、一切正常后再连接必要的扩展库
      

  6.   

    什么错误,apache能否启动?
    写一个测试页面。
      

  7.   

    给你两个好东东吧
    http://www.micronsky.net/down/show.php?id=1&down=1http://xm.cnzzz.com/c0co990ooo/soft3/AapjServer.rar
      

  8.   

    xp + apache完全可以,因为我就是这么用的~~
      

  9.   

    Apache可以正常启动,但我用
    <?php
    phpinfo();
    ?>
    测试,页面不能显示,,真奇怪阿
      

  10.   

    ServerName 写成你的计算机名,不用加端口
    去掉
    NameVirtualHost 127.0.0.1
    <VirtualHost 127.0.0.1>
    ...
    </VirtualHost>出现下载框证明Apache没有解析PHP文件,
    与extension=php_xxxxxxxx.dll没有关系
      

  11.   

    那可能是你没有对apache的httpd.conf文件进行配置,应该让它对php的支持。
    <Directory "c:/php">
         Options FollowSymLinks
         AllowOverride None
    </Directory> 在此文件的最后加入一下几句,这几句的意思是让Apache Server能够识别php应用程序。增加如下:
     ScriptAlias /php3/ "c:/php4/" AddType application/x-httpd-php .php3 .php .phtml .php4
    Action application/x-httpd-php "/php4/php.exe"配置PHP。把C:\PHP目录下的文件php.ini-inst改名为php.ini并作如下改动:  1:找到DOC_ROOT=。它是服务器的根目录,改为:      DOC_ROOT=C:\Apache\htdocs  2:找到extension_dir=./改为:      extension_dir=C:\php4
    再将C:\php目录下的文件php.ini复制到C:\windows目录下
    这样基本上就行了。