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

    推荐阅读