Chinaunix首页 | 论坛 | 博客
  • 博客访问: 540459
  • 博文数量: 83
  • 博客积分: 6010
  • 博客等级: 准将
  • 技术积分: 1169
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-29 22:34
文章分类

全部博文(83)

文章存档

2011年(3)

2010年(29)

2009年(30)

2008年(21)

我的朋友

分类: LINUX

2008-08-20 22:20:45

1,禁止浏览目录
在中找到

Options Indexes FollowSymLinks

改为

Options -Indexes FollowSymLinks


2, 文档路径DocumentRoot
DocumentRoot "/mnt/share/webroot"
该路径不能设置为/root下的路径,不然会显示没有权限访问:

Forbidden

You don't have permission to access / on this server.


3,默认页面。

<IfModule dir_module>
    DirectoryIndex index.html index.html.var index.htm index.php
</IfModule>

在文件modules.d/00_default_settings.conf中的DirectoryInde,后面依次是默认页面

4,添加php
在文件/etc/conf.d/apache2中:

APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D PHP5"

添加-D PHP5。
记得按照php时要指定USE = apache2,不然不会生成apache配置,这些配置写在/etc/apache2/modules.d/70_mod_php5.conf中
阅读(1357) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~