LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 623|回复: 0

配置Apache每个用户的个人Web站点

[复制链接]
发表于 2003-11-29 00:44:48 | 显示全部楼层 |阅读模式
配置Apache每个用户的个人Web站点

/ 修改主配置文件
#vi /etc/httpd/conf/httpd.conf
/ 修该其中的以下配置
<IfModule mod_userdir.c>
        UserDir disable root  /禁止roor使用个人站点,基于安全
        UserDir public_html       
<IfModule>
/ 设置用户的个人站点,将配置文件中的以下文件前的#号去掉
<Directory /home/*/public_html>
        AllowOverride FileInfo AuthConfig Limit
        Options MultiViews Indexes SymLinkeIfOwnerMatch IncludesNoExec
        <Limit GET POST OPTIONS>
                order allow,deny
                Allow from all
        </Limit>
        <LimitExcept GET POST OPTIONS>
                order deny,allow
                Deny from all
        </LimitExcept>
</Directry>
/ OK restart httpd

用户为创建自己的个人站点所需步骤
#useradd abc
#passwd abc
#su – abc
$mkdir public_html
$cd public_html
$touch index.html
/ 编写index.html 用户自己的个人网页
$cd /home
$chmod 711 abc
/ OK了,可以用浏览器访问个人主页了(在浏览器中输入http://ip地址/~abc)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表