免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1538 | 回复: 3
打印 上一主题 下一主题

问个APACHE2 + PHP4的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-02-15 12:49 |只看该作者 |倒序浏览
环境: RHEL3U5, APACHE2.0.55, PHP4.4.2

1-编译安装APACHE -> /usr/local/httpd
   ./configure --exec-prefix=/usr/local/httpd --prefix=/usr/local/httpd --enable-so
    make
    make install

2-编译安装PHP -> /usr/local/httpd/php
   ./configure --prefix=/usr/local/httpd/php --with-config-file-path=/usr/local/httpd/php --enable-sockets --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/include --with-gd
    make
    make install

3-配置
  cp php.ini-dist /usr/local/httpd/php/php.ini
   
    vi /usr/local/httpd/conf/httpd.conf
    # add the follwing lines
    AddType application/x-tar .tgz
    AddType application/x-httpd-php .php
    AddType image/x-icon .ico
    DirectoryIndex index.php index.html index.html.var


4-测试
  more /usr/local/httpd/htdocs/index.php
    <html>
    <p>If PHP is working, you will see "Hello World" below:<hr>
    <?php
       echo "Hello world";
       phpinfo();  // Print PHP version and config info
    ?>
   </html>

  IE 6中输入 http://linux_ip/index.php,却提示下载index.php文件!!!

  哪位老大,给说一下原因和怎么解决??

  谢谢!!!

论坛徽章:
0
2 [报告]
发表于 2006-02-15 15:15 |只看该作者
那怎么做

论坛徽章:
0
3 [报告]
发表于 2006-02-17 17:35 |只看该作者
楼主配置完成 重新启动过APACHE了嘛

论坛徽章:
0
4 [报告]
发表于 2006-02-21 16:56 |只看该作者
在http.conf的 DirectoryIndex项后加入index.htm
就是设置index.htm为默认页面
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP