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

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

DocumentRoot指向错误,于是修改之,另外确保你的apache开启了rewrite_module模块。

Apache的rewrite_module模块,支持.htaccess。

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

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

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

你可能感兴趣的:(Linux,url,apache,linux)