个人主页系统在Apache上的实现方法Web服务器教程
|
| 论文作者:佚名 论文来源:不详 论文发布时间:2006-6-18 23:09:13 论文发布人:chjchjchj |
减小字体
增大字体
摘要:个人主页系统在Apache上的实现方法 结合大家的经验和我自己的实践,得到以下几点[b:2a34ab9e97]在Apache上实现个人主页系统[/b:2a34ab9e97]的方法。(注意:我的测试环境如下:FreeBSD4.7+Apache2.0.43)
问题: [color=red:2a34ab9e97][b:2a34ab9e97]Apache上的个人主页系统[/b:2a34ab9e97][/color:2a34ab9e97] 目的: 1.WEB:[b:2a34ab9e97]http://www.site.com/~username[/b:2a34ab9e97] 2.FTP :[b:2a34ab9e97]/www/free/username/public_html[/b:2a34ab9e97]
方法一:使用[b:2a34ab9e97][color=red:2a34ab9e97]mod_userdir[/color:2a34ab9e97][/b:2a34ab9e97]模块 需要使用Apache 之中的userdir_module, 将 [b:2a34ab9e97]LoadModule userdir_module libexec/apache2/mod_userdir.so[/b:2a34ab9e97] 之前的#去掉, 然后如下配置:
[b:2a34ab9e97]UserDir /www/free/*/public_html/ <Directory /www/free/*/public_html> DirectoryIndex index.html </Directory>[/b:2a34ab9e97]
方法二:使用[color=red:2a34ab9e97][b:2a34ab9e97]rewrite[/b:2a34ab9e97][/color:2a34ab9e97] 需要使用Apache之中的rewrite_module, 将 [b:2a34ab9e97]LoadModule rewrite_module libexec/apache2/mod_rewrite.so[/b:2a34ab9e97]之前的#去掉, 然后如下配置:
[b:2a34ab9e97]RewriteRule ^/~([0-9A-Za-z_\-]+)(.*) /wwww/free/$1/public_html$2 <Directory /www/free/*/public_html> DirectoryIndex index.html </Directory>[/b:2a34ab9e97]
说明: 1.用户的FTP可以使用任何FTP系统来指定其路径为/www/free/username
flYROW 回复于:2003-05-10 19:26:24[quote:53f4547bcd="HonestQiao"]得? 1.用户的FTP可以使用任何FTP系统来指定其路径为/www/free/username[/quote:53f4547bcd][color=red:53f4547bcd][/color:53f4547bcd]你好,刚来,望多关照,
flYROW 回复于:2003-05-10 19:27:38什么意思,很不情愿吗?
flYROW 回复于:2003-05-10 19:27:54什么意思,很不情愿吗?
flYROW 回复于:2003-05-10 19:28:24什么意思,很不情愿吗?
HonestQiao 回复于:2003-05-10 19:29:34我不清楚你要问什么?
海浪001 回复于:2003-05-12 11:20:02win2000下如何装apache啊, 我装好后说服务没启动. 能告诉我吗?
还有如何在win2000下如何装WEB服务器.
多谢.
冰箱 回复于:2003-05-12 13:41:45UserDir /www/free/*/public_html/
为什么不能写成 UserDir public_html
我看的资料都是这样设的啊?? (但我的不行,要设成/home/*/public_html)
liubin5280 回复于:2003-05-13 08:00:39冰箱: 咱俩设的一样,为何当我在IE中输入http://210.82.156.189/~linux123时,提示为You don't have permission to access /~linux123 on this server,我应在哪改权限?
fastopen 回复于:2003-06-02 16:48:12老大,我的win2000+apache 可以实现个人主页吗,
等待中。。。。。。。。
fastopen 回复于:2003-06-02 16:56:39已经好了, 不用。。
fastopen 回复于:2003-06-02 17:10:33老大,我用userdir成功,
用rewrite 按你的方法未成功。不知道是怎么的,请指点,
gleilei 回复于:2003-09-09 13:11:28[quote:034f03de7e="liubin5280"]冰箱: 咱俩设的一样,为何当我在IE中输入http://210.82.156.189/~linux123时,提示为You don't have permission to access /~linux123 on this server,我应在哪改权限?[/quote:034f03de7e]
一样的问题
wuhanzhou 回复于:2003-09-10 09:28:47是呀是呀在在哪儿更改权限呀?
wuhanzhou 回复于:2003-09-10 09:39:18哥们给我介绍一本APACHE的书吧!
yoursmile 回复于:2003-09-10 11:57:56[quote:9aee6eb6ba="HonestQiao"]得? 1.用户的FTP可以使用任何FTP系统来指定其路径为/www/free/username[/quote:9aee6eb6ba]
不错。我收了。
yancangcn 回复于:2003-09-10 19:43:22还可以吧
rdd 回复于:2003-09-23 15:55:13[quote:c53d7473f5="liubin5280"]冰箱: 咱俩设的一样,为何当我在IE中输入http://210.82.156.189/~linux123时,提示为You don't have permission to access /~linux123 on this server,我应在哪改权限?[/quote:c53d7473f5] [code:1:c53d7473f5] #mkdir /home/linux123/public_html #chown linux123:linux123 public_html #cd .. #chmod 711 linux123 [/code:1:c53d7473f5]
carolson 回复于:2003-09-25 18:39:22本方法的局限问题? 1. ftp 软件 ftp 用户与系统用户分开时的 权限问题。 2. php 的文件读写问题 比如用户user1 不可读 user2 如何实现?
JLW 回复于:2003-10-17 15:23:08[quote:935e82dcf5="wuhanzhou"]是呀是呀在在哪儿更改权限呀?[/quote:935e82dcf5]
呵呵,我也刚来,没搞过服务器,但是我想要以你运行apache进程的用户来拥有这个权限就可以了....就好比IIS的IUSR_机器名一样 . 我去试一下:)
金玄 回复于:2003-10-31 21:52:12有没有支持二级域名的,而不是~username的呢.且又能通过WEB程序自动让他实现,不知道目前的主机商都是如何实现实时开虚拟主机的.
|
|
|
|
|
|
|
| ∷相关技术评论 |
(评论内容只代表网友观点,与本站立场无关!) [查看发表评论...] | |
|
|
| |
站内广告 |
| |
|
站内搜索 |
| |
栏目导航 |
| |
|
|
本月热门 |
| |
|
|
本日热门 |
| |
|
|
|