apache httpd.conf 路径配置
2016-05-27 17:27
281 查看
DocumentRoot "/Users/worldzhy/Documents/InceptionPad" <Directory "/Users/worldzhy/Documents/InceptionPad"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options FollowSymLinks Multiviews MultiviewsMatch Any # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Require all granted </Directory> Alias /execsearch/ /Users/worldzhy/Documents/InceptionPad/ExecSearch/public/ <Directory "/Users/worldzhy/Documents/InceptionPad/ExecSearch"> Options FollowSymLinks Multiviews MultiviewsMatch Any AllowOverride All Require all granted </Directory>
请看这段配置,特别需要注意。
1.Alias /execsearch/ 这里最后如果有/,那么/Users/worldzhy/Documents/InceptionPad/ExecSearch/public/ 最后也要有/。
否则就会路由就会有问题。
2.通过试验,如果最后都有/,那么访问http://localhost/execsearch 是不行的,错误如下:
403 Forbidden You don't have permission to access /execsearch on this server.
3.但是如果最后都没有/,那么访问http://localhost/execsearch 和 http://localhost/execsearch/ 都是可行的。
相关文章推荐
- 计算机网络之应用层
- Linux下Apache HTTP Server 2.4.20安装
- JAVA 调用HTTPPOST请求
- http://www.cnblogs.com/zhengyun_ustc/p/55solution2.html
- iOS之网络篇
- Android网络请求报错:java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
- Fiddler2拦截http请求修改数据两种方法
- 为什么需要https
- httpModules 与 httpHandlers
- 后台程序员的HTTP缓存
- Ext.data.HttpProxy传参的中文乱码解决办法
- HTTPS
- TCP总结
- 七层网络协议
- apache httpd启动关闭,以及设置开机启动
- REDHAT AS4 不能登陆的解决办法
- 移动无线网络切换组合
- [golang note] 网络编程 - RPC编程
- linux内核工程导论-网络:tcp拥塞控制
- 百度定位+广播检测网络(小白版)