linux中提示The requested URL *** was not found on this server

清疚 2022-07-12 03:56 1049阅读 0赞

因为之前别人在服务器上装了nginx,我装了apache后,访问出现The requested URL * was not found on this server,查看了下/etc/httpd/conf/httpd.conf,发现原因:

  1. DocumentRoot指向错误,于是修改之,另外确保你的apache开启了rewrite_module模块。
  2. Apacherewrite_module模块,支持.htaccess

rewrite_module没开启,开启过程如下:

打开文件:
/etc/httpd/conf/httpd.conf
查找so文件:
LoadModule rewrite_module modules/mod_rewrite.so

将前面”#”去掉,如果不存在则添加上句。
done.

发表评论

表情:
评论列表 (有 0 条评论,1049人围观)

还没有评论,来说两句吧...

相关阅读