Apache 添加虚拟目录注意事项(apache设置虚拟目录)

Apache 添加虚拟目录注意事项(apache设置虚拟目录)

扫码添加渲大师小管家,免费领取渲染插件、素材、模型、教程合集大礼包!

问题:配置Apache。httpd.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.

分享到 :
相关推荐

云服务器试用要注意哪些事项(云服务器试用要注意哪些事项呢)

云服务器试用要注意的事项有:1。注意确保云服务商是否符合安全标准。保证能保护客户数据...

Godaddy主机方案升级的操作方法(godaddy主机怎么样)

我们都知道Godaddy是全球第一大域名注册商。进军主机领域之后。放在Godaddy...

vps不限流量租用怎么设置301跳转

vps不限流量租用设置301跳转的方法:1。打开vps自带的信息服务管理工具。删除主...

购买云服务器时需要考虑哪些(购买云服务器时需要考虑哪些因素)

购买云服务器时需要考虑的问题有:1.网站类型。操作系统。存储模式;2.网站访问量。C...

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注