Apache如何添加虚拟目录
2013-11-17 20:43
375 查看
转载:/article/5914629.html
Alias /sww/ "C:/xampp/htdocs/test/"
</IfModule>
出现限制权限访问,
If you think this is a server error, please contact the webmaster.
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
<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.
问题:配置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
localhost2011/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.
相关文章推荐
- 如何创建apache虚拟目录
- ubuntu apache添加虚拟目录
- Apache添加虚拟主机目录
- apache如何配置多个虚拟目录
- 如何修改和添加Apache的默认站点目录
- apache添加虚拟目录的方法
- apache如何添加虚拟主机和在虚拟主机中实现用户验证
- Apache 添加虚拟目录注意事项
- 如何修改和添加Apache的默认站点目录
- Apache如何配置php网站虚拟目录
- Apache的虚拟目录功能和如何对某一个目录进行访问权限控制
- apache 添加虚拟目录
- 如何给Apache添加虚拟路径和虚拟主机?
- Apache 配置二级域名匹配目录及多个站点配置 +阿里云服务器如何解析添加二级域名
- 如何配置Apache虚拟目录
- 如何开启apache虚拟目录反向代理
- Apache创建虚拟目录绑定域名
- apache虚拟目录
- 【PHP编程之路-1】设置apache虚拟目录
- apache 配置默认目录外当虚拟目录