惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
The GitHub Blog
The GitHub Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
小众软件
小众软件
博客园_首页
G
Google Developers Blog
Apple Machine Learning Research
Apple Machine Learning Research
MyScale Blog
MyScale Blog
Engineering at Meta
Engineering at Meta
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
Docker
B
Blog
雷峰网
雷峰网
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
宝玉的分享
宝玉的分享

博客园 - yaksea

APScheduler: standalone vs daemonic 一句话解释jquery中offset、pageX, pageY、position、scrollTop, scrollLeft的区别 mongodb正则查询使用须知 PhoneGap源代码下载地址 python mysql 库的安装 windows环境下PYTHONPATH的设置 Eclipse+pydev2.2+python2.7 中文乱码问题 雷军:互联网创业的葵花宝典 什么是node.js 对python元类概念的理解 设置Django,在Eclipse+PyDev环境中开发Django应用 Python的模块、包等概念的理解 Python下划线与命名规范 Django如何进行数据访问查询 Django IDE 开发环境的搭建 在Eclipse下如何安装插件 使用Django如无到有11步快速构建Web应用 如何使用blog客户端 Zend Studio下的PHP代码调试
Apache如何添加虚拟目录
yaksea · 2011-08-26 · via 博客园 - yaksea

问题:配置Apachehttpd.conf

添加虚拟目录

<IfModule alias_module>
      Alias /sww/ "C:/xampp/htdocs/test/"

</IfModule>

出现限制权限访问,

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403

localhost
2011/8/26 17:36:49
Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1

需添加目录设置

<Directory "C:/xampp/htdocs/test/">

    AllowOverride None

    Options None

    Order allow,deny

    Allow from all

</Directory>

尝试:

1.  C:/xampp/htdocs/test//去掉,结果:无法启动apache

2.  C:/xampp/htdocs/test//改成\,结果:无法启动apache

3.  C:/xampp/htdocs/test/改为"D:/Work/Booksir/BP/Code/User_Booksir_com_cn/trunk/",结果:无法启动apache

4.  C:/xampp/htdocs/test/文件夹有Everyone完全控制权限,给D:/Work/Booksir/BP/Code/User_Booksir_com_cn/trunk加上Everyone的完全控制权限,结果:仍无法启动apache

5.  "D:/Work/Booksir/BP/Code/User_Booksir_com_cn/trunk/"/去掉,/sww//去掉,结果:成功启动apache

结论:

最好

Alias /sww "D:/Work/Booksir/BP/Code/User_Booksir_com_cn/trunk"

<Directory "D:/Work/Booksir/BP/Code/User_Booksir_com_cn/trunk">

后面都不要加/,都不要使用\,这样比较保险

    # If you include a trailing / on /webpath then the server will

    # require it to be present in the URL.  You will also likely

    # need to provide a <Directory> section to allow access to

    # the filesystem path.