httpd.conf文件设置
部署linux服务器后,访问项目某个页面时遇到:
Not FoundThe requested URL /xxx/xxx/xxx/getxxx was not found on this server.Apache/2.2.15 (CentOS) Server at 12*.***.201.40 Port 80
在yum方式安装的httpd.conf文件的安装文件夹设置是这样的:
#
# 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.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
改成下面配置就好了:
#
# 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.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride all#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
【httpd.conf文件设置】转载于:https://my.oschina.net/tangzhichao/blog/781613
推荐阅读
- 第6.2章(设置属性)
- django-前后端交互
- 如何在Mac中的文件选择框中打开系统隐藏文件夹
- 使用composer自动加载类文件
- ssh生成公钥秘钥
- 15、IDEA学习系列之其他设置(生成javadoc、缓存和索引的清理等)
- Android系统启动之init.rc文件解析过程
- performSelectorOnMainThread:withObject:waitUntilDone:参数设置为NO或YES的区别
- 微信小程序基础知识
- 误删/清空.bashrc文件/内容