|
配置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) |
|