生而为人我很抱歉

好记性不如烂博客

httpd.conf文件设置

部署linux服务器后,访问项目某个页面时遇到:

Not Found

The 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文件的安装文件夹设置是这样的:

<Directory "/var/www/html">

#
# 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

</Directory>

改成下面配置就好了:

<Directory "/var/www/html">

#
# 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

</Directory>
阅读更多
版权声明:欢迎转载,转载请注明原地址,谢谢! https://blog.csdn.net/u012643122/article/details/49892137
个人分类: Web服务器
想对作者说点什么? 我来说一句

Apache与tomcat配置

2009年03月12日 64KB 下载

没有更多推荐了,返回首页

不良信息举报

httpd.conf文件设置

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭