默认web目录/var/www/html 改成 /data/www出现403问题解决:

vim /etc/apache2/apache2.conf

<Directory /data/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

/etc/apache2/sites-available/000-default.conf

<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com ServerAdmin webmaster@localhost
DocumentRoot /data/www # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Apache服务器出现Forbidden 403错误提示的解决方法的更多相关文章

  1. Apache服务器出现Forbidden 403错误提示的解决方法总结

    在配置Linux的 Apache服务时,经常会遇到http403错误,我今天配置测试时也出现了,最后解决了,总结了一下.http 403错误是拒绝访问的意思,有很多原因的.还有,这些问题在win平台的 ...

  2. Apache Forbidden 403错误提示

    在配置Linux的 Apache服务时,经常会遇到http403错误,我今天配置测试时也出现了,最后解决了,总结了一下.http 403错误是拒绝访问的意思,有很多原因的.还有,这些问题在win平台的 ...

  3. Android JNI 编译正确 但是提示程序有错误无法运行 而且还看不到任何错误提示 的解决方法

    前几篇中一直在通过Android做JNI调用,关于JNI的配置请见:http://blog.csdn.net/watkinsong/article/details/9849973 但是前一段时间就遇到 ...

  4. APACHE服务器httpd.exe进程占用cpu100%的解决方法

    httpd.exe进程占用cpu%100,关闭掉AppServ服务,cpu应用率立刻下降到0. 重新启动AppServ又出现占用cpu高的情况. 原因,httpd.exe和防火墙配置有冲突. 解决方法 ...

  5. mysql 不能启动的两种错误提示及解决方法

    在linux系统中安装mysql服务器详细步骤并解决ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passw ...

  6. idea没有错误提示的解决方法(一直处于错误分析中)

    仅作记录,以防再次发生却不记得. 原文链接:https://blog.csdn.net/a755199443/article/details/90084316 问题描述:idea没有自动报错.例如随便 ...

  7. 关于使用FusionCharts生成图表时出现invalid xml data错误提示的解决方法

    FusionCharts的确功能是够强大的.收集的功能估计更强大.在初次使用时,对着手册,一步一步操作,就是生成图表工具不成功.一直报"Invalid xml data"错误.后面 ...

  8. VMware workstation 安装错误提示1021解决方法

    Failed to create the requested registry key Key: Installer Error: 1021 解决方法:删除注册表--HKEY_LOCAL_MACHIN ...

  9. vue中npm run dev运行项目不能自动打开浏览器! 以及 webstorm跑vue项目jshint一直提示错误问题的解决方法!

    vue中npm run dev运行项目不能自动打开浏览器!以及 webstorm跑vue项目jshint一直提示错误问题的解决方法! 1.上个项目结束就很久没有使用vue了,最近打算用vue搭建自己的 ...

随机推荐

  1. 深入理解webpack基本配置(一)

    1. 安装webpack到全局 在学习构建之前,我们来在本地文件新建一个存放项目的文件夹,比如叫demo1这个项目,然后进入demo1该项目的根目录后,执行命令 npm init运行下,一路回车(先简 ...

  2. 类Random

    /* * Random:产生随机数的类 * * 构造方法 * public Random();没有给种子,用的是默认种子,是当前时间的毫秒值 * public Random(long seed);使用 ...

  3. POI向Excel中写入数据及追加数据

    import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import ...

  4. 【ABAP系列】SAP ABAP ALV中的TOP_OF_PAGE添加任意图标

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[MM系列]SAP ABAP ALV中的TOP_ ...

  5. ABI与API的区别

    ABI是定义二进制级别的,两个模块的接口 比如一个二进制模块想要调用另外一个二进制模块提供的功能,它需要知道怎样通过汇编语言(即机器指令)去调用,以及怎样传递相应的参数和返回值(通过寄存器还是栈内存, ...

  6. State Function Approximation: Linear Function

    In the previous posts, we use different techniques to build and keep updating State-Action tables. B ...

  7. 浅谈vue$router 和 $route的区别

    最近在学习vue的单页面应用开发,需要vue全家桶,其中用到了VueRouter,在路由的设置和跳转中遇到了两个对象$router 和 $route ,有些傻傻分不清,后来自己结合网上的博客和自己本地 ...

  8. 一件很奇怪的事关于Nuget包

    两个项目 A,B 分别引用了Newtonsoft.Json.dll A项目有引用B项目. A B 项目引用Newtonsoft.Json.dll文件源路径是相同的.但是经常报版本不匹配. 之后经过细心 ...

  9. STL hash function的模板特化

    哈希函数的作用是将一个值映射为一个哈希值,从而根据这个哈希值,在哈希表中对数据进行定位. template <class _Val, class _Key, class _HashFcn, cl ...

  10. SCUT - 38 - 屠场的秘密 - 分解

    https://scut.online/p/38 要求是2016的倍数,把每个数分解成有2016的倍数和余数,两数余数的乘积是2016的倍数,则原数的乘积也是2016的倍数.