我在本地虚拟机上配置LAMP环境(我的Linux是图形界面) 该装的都装好了 
在地址来里输入http://localhost 不走PHP代码 反而显示Apache成功安装的页面
是配置问题么 我从网上查了 也改了就是不行
请问是怎么回事 怎么解决?谢谢各位!

解决方案 »

  1.   

    你是在地址栏输入已有的PHP页面的地址不执行而下载呢,还是你就进去首页显示安装成功画面?
    一个是要配置APACHE支持PHP,一个是配置默认首页为index.php或其他.php
    要不你建一个内容为
    <?php
    phpinfo();
    ?>
    名字为info.php的文件在浏览器里看看能否执行
      

  2.   

    我在地址栏输入http://localhost/index.php
    浏览器如下显示:Object not found!
    The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. 
    If you think this is a server error, please contact the webmaster 
    Error 404
    192.168.189.132 
    2010��11��19�� ������ 05ʱ32��09�� 
    Apache/2.0.40 (Red Hat Linux) 
      

  3.   

    根目录  /usr/local/apache/htdocs 有测试的文件
    如果输入http://localhost/ 如下显示
    Test Page
    This page is used to test the proper operation of the Apache Web server after it has been installed. If you can read this page, it means that the Apache Web server installed at this site is working properly. 
    .....
    The Apache documentation has been included with this distribution. For documentation and information on Red Hat Linux, please visit the Red Hat, Inc. website. The manual for Red Hat Linux is available here. You are free to use the image below on an Apache-powered Web server. Thanks for using Apache!  You are free to use the image below on a Red Hat Linux-powered Web server. Thanks for using Red Hat Linux!  
      

  4.   

    根目录有的是index.htm或index.html吧,但是肯定没有index.php这个文件
    你按照我在1楼说的新建那个info.php文件测试下
      

  5.   

    http://localhost/测试文件名//记得后缀
      

  6.   

    1.你确定你LAMP环境搭建正确,你可以用2楼的方法建个phpinfo,来查看。http://localhost/info.php2.如果,上面正确显示。http.conf里面 
    <IfModule dir_module>
        DirectoryIndex index.html index.php
    </IfModule>确认你/usr/local/apache/htdocs 有index.php的文件。
      

  7.   

    谢谢大家的帮忙 找到问题了
    是<IfModule dir_module>
      DirectoryIndex index.php index.html
    </IfModule>
    的问题  再次感谢