The requested URL *** was not found on this server
2016-02-17 23:30
639 查看
本文章来给大家介绍关于在使用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没开启,开启过程如下:
centos的配置文件放在:
打开文件找到:
将前面"#"去掉,如果不存在则添加上句。
如果你的网站是根目录的话:找到
将上面的None改为All
如果你的站点不在根目录,设置如下:
OK,然后重启服务器,service httpd restart ,这样.htaccess就可以使用了
因为之前别人在服务器上装了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没开启,开启过程如下:
centos的配置文件放在:
代码如下 | 复制代码 |
/etc/httpd/conf/httpd.conf |
代码如下 | 复制代码 |
LoadModule rewrite_module modules/mod_rewrite.so |
如果你的网站是根目录的话:找到
代码如下 | 复制代码 |
<Directory /> Options FollowSymLinks AllowOverride None </Directory> |
如果你的站点不在根目录,设置如下:
代码如下 | 复制代码 |
<Directory "/var/www/html/my_directory"> Order allow,deny Allow from all AllowOverride All </Directory> |
相关文章推荐
- 多个UIImage合并成一个UIImage
- 五种创建UIImage的类方法
- iOS开发之UIImage等比缩放
- UIViewController的edgesForExtendedLayout属性
- 自定义导航按钮UIBarButtonItem
- Handler、Loop、MessageQueue的工作原理
- EasyUI系列学习(三)-Draggable(拖动)
- UESTC 1186 Gray code - 简单数位dp
- NSValue包装类
- 读取和解析XML数据----读取XML DocumentBuilderFactory
- 如何获取UIStoryboard里编辑的界面,如何pop回navigationController的某层界面
- UISearchController
- iOS-UI-基本控件之UIButton
- UIPickview 省市联动注意点(如何防止同时两组或多组滑动时,数组越界问题)
- UITableView的编辑
- UITableView控件Protocell的Identifier设置 注意事项
- VS2015--win32工程配置的一些想法之警告:“BOOL”: 将值强制为布尔值“true”或“false”(性能警告)
- VS2015--win32工程配置的一些想法之警告:“BOOL”: 将值强制为布尔值“true”或“false”(性能警告)
- how to set value for cmake arguement in command
- 从unique_ptr赋值到shared_ptr引起的指针悬空bug