热门关键字:  ubuntu  分区  Fedora  linux系统进程  函数

启动用户的个人网页(centos 5.2下)

来源: 作者: 时间:2008-08-12 Tag: 点击:
启动用户的个人网页(centos 5.2下)

1.创建test用户
*********略*********

2.创建public_html目录
# mkdir /home/test/public_html

3. 修改相关目录的访问权限
# chmod -R 755 /home/test/

4. 修改httpd.conf配置文件如下:

#**************************** 略************************************
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid. This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
#
<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disable

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
UserDir public_html

</IfModule>
#******************************略*************************

5. 重启httpd服务
# /etc/rc.d/init.d/httpd restart

6. 在/home/test/public_html目录下建立一个名为index.html的网页文件。

6. 测试
在浏览器上输入:
http://你的网站名称/~test/index.html
即可。

7. 那么如何去掉上面的"~"符号呢,有如下几个方法:

1. 建立连接文件

# ln -s /home/test/public_html /var/www/html/test
2.建立alias

# vi /etc/httpd/conf/httpd.conf
Alias /test/ "/home/test/public_html/"
<Directory "/home/test/public_html/">
********************
</Directory>
# /etc/rc.d/init.d/httpd restart
此时在浏览器下输入
http://你的网站名称/test/index.html
ok了。



相关文章:
apache jsp tomcat 虚拟主机 在加上pure-ftp
squid 优化(解释篇)
调整centos文件打开数
REDHAT AS安装10g错误
用SystemImager克隆系统(一)
openssh 5.1版使用chroot sftp帐号技术
HPUX从入门到提高之三
postfix+vm-pop3+openmail 构造邮件服务器
SecureCRT设置
双机备份方案(resin集群+冷备)
开启rsh服务
Solaris9允许root用户登录ssh
Solairs如何上网?
实战PXE启动安装Redhat AS 5 Linux
RHCT Lab1: Network Installation
RHCE Lab1: Kickstart
RHCE Lab1.1: Auto Installation
apache版本号显示的问题
修改tomcat端口号
RS/6000小型机故障的基本定位方法
Linux下的权限管理-ACL
CactiEZv9监控CentOS5.0
Red Hat Enterprise Linux 5.2 简明安装手册
StorNext 简单安装说明
FreeBSD7 Apache2.2 PHP5 PostgreSQL8.3 Ports安
关于nagios监控系统添加主机和服务脚本
C和C++语言学习总结
apache优化
CentOS+Nginx+PHP+Mysql(1)
Apache服务器限制并发连接和下载速度