httpd 13 permission denied make_sock could not bind to address 失败的原因
来源:互联网 发布:温度显示软件 编辑:程序博客网 时间:2024/05/21 11:22
仔细检查了一遍配置文件httpd.conf,找到这么一段:
代码如下 复制代码
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
deny from all
Satisfy all
</Directory>
然后试着把deny from all中的deny改成了allow,保存后重起了apache,然后再一测试我的网页
apache
解决Apache下403 Forbidden错误
正 文:
今天在公司电脑上安装Apache,版本2.2.8,装完刚测试可以;配置了下php的php.in文件再次localhost打开发现错误:HTTP 错误 403 - 禁止访问,即403 Forbidden:You don't have permission to access / on this server.权限又不够了?
马上打开apache的配置文件httpd.conf,逐行检查。在大约快一半的地方有以下这段代码:
代码如下 复制代码
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
发现了吧。由于配置了php后,这里的“Deny from all”已经拒绝了一切连接。把该行改成“allow from all”,修改后的代码如下,问题解决。
代码如下 复制代码
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
</Directory>
系统是centos,You don't have permission to access / on this server.
在google上搜索了一下,大部分的解决方法就是。
代码如下 复制代码
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory> 这里改成
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory
>
我改了之后还是会出现上面的错误,于是看一下自己设定的工作目录权限。
代码如下 复制代码
Options ExecCGI Includes
改成下面这行设置后,显示正常。
代码如下 复制代码
Options Indexes FollowSymLinks
当访问类unix操作系统上的/usr/local/apache2/htdocs/foo/bar.htm文件时,你收到了Permission Denied的错误。
首先,查看文件的访问权限:
代码如下 复制代码
$ cd /usr/local/apache2/htdocs/foo
$ ls -l bar.htm
如果须要的话,就修复它们:
代码如下 复制代码
$ chmod 644 bar.html
对文件夹以及每个父文件夹做相同的操作
代码如下 复制代码
(/usr/local/apache2/htdocs/foo,/usr/local/apache2/htdocs,/usr/local/apache2,/usr/local/,/usr):
$ ls -la
$ chmod +x
$ cd ..
$ #repeat up to the root
在一些系统上,可使用工具namei来列出各个路径上的不同组件的访问权限,然后去发现是否有权限问题:
代码如下 复制代码
$ namei -m /usr/local/apache2/htdocs/foo/bar.html
3、最后,如果还是没有解决问题,那么需要查看扩展的访问权限。
使用setenforce 0关闭SELinux,看是否解决问题(关闭防火墙)
代码如下 复制代码
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
deny from all
Satisfy all
</Directory>
然后试着把deny from all中的deny改成了allow,保存后重起了apache,然后再一测试我的网页
apache
解决Apache下403 Forbidden错误
正 文:
今天在公司电脑上安装Apache,版本2.2.8,装完刚测试可以;配置了下php的php.in文件再次localhost打开发现错误:HTTP 错误 403 - 禁止访问,即403 Forbidden:You don't have permission to access / on this server.权限又不够了?
马上打开apache的配置文件httpd.conf,逐行检查。在大约快一半的地方有以下这段代码:
代码如下 复制代码
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
发现了吧。由于配置了php后,这里的“Deny from all”已经拒绝了一切连接。把该行改成“allow from all”,修改后的代码如下,问题解决。
代码如下 复制代码
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
</Directory>
系统是centos,You don't have permission to access / on this server.
在google上搜索了一下,大部分的解决方法就是。
代码如下 复制代码
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory> 这里改成
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory
>
我改了之后还是会出现上面的错误,于是看一下自己设定的工作目录权限。
代码如下 复制代码
Options ExecCGI Includes
改成下面这行设置后,显示正常。
代码如下 复制代码
Options Indexes FollowSymLinks
当访问类unix操作系统上的/usr/local/apache2/htdocs/foo/bar.htm文件时,你收到了Permission Denied的错误。
首先,查看文件的访问权限:
代码如下 复制代码
$ cd /usr/local/apache2/htdocs/foo
$ ls -l bar.htm
如果须要的话,就修复它们:
代码如下 复制代码
$ chmod 644 bar.html
对文件夹以及每个父文件夹做相同的操作
代码如下 复制代码
(/usr/local/apache2/htdocs/foo,/usr/local/apache2/htdocs,/usr/local/apache2,/usr/local/,/usr):
$ ls -la
$ chmod +x
$ cd ..
$ #repeat up to the root
在一些系统上,可使用工具namei来列出各个路径上的不同组件的访问权限,然后去发现是否有权限问题:
代码如下 复制代码
$ namei -m /usr/local/apache2/htdocs/foo/bar.html
3、最后,如果还是没有解决问题,那么需要查看扩展的访问权限。
使用setenforce 0关闭SELinux,看是否解决问题(关闭防火墙)
阅读全文
0 0
- httpd 13 permission denied make_sock could not bind to address 失败的原因
- httpd 13 permission denied make_sock could not bind to address 失败的原因
- 关于Centos 出现httpd:(13)Permission denied: make_sock: could not bind to address [::]:80 (13)Permission
- Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]
- Starting httpd: (13)Permission denied: make_sock: could not bind to address
- apache2.x修改默认端口后报 Starting httpd: (13)Permission denied: make_sock: could not bind to address
- apache2.x修改默认端口后报 Starting httpd: (13)Permission denied: make_sock: could not bind to address .
- Permission denied: make_sock: could not bind to address处理
- permission denied make_sock could not bind to address
- 解决:Permission denied: make_sock: could not bind to address
- 解决:Permission denied: make_sock: could not bind to address
- 解决:Permission denied: make_sock: could not bind to address
- Permission denied: make_sock: could not bind to address [::]:80
- Linux:解决Permission denied: make_sock: could not bind to address
- linux 下apche无法监听端口解决办法(Permission denied: make_sock: could not bind to address)
- Permission denied: make_sock: could not bind to address [::]:81 Apache 虚拟主机
- linux apache报Permission denied: make_sock: could not bind to address
- Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address
- TensorFlow官方教程学习笔记之1-TensorFlow入门教程(Getting Started With TensorFlow)
- IDEA实现热部署,在不重启服务器的前提下可以同时升级系统
- 使用ajax 和 FormData 实现无刷新提交 带文本和文件的表单
- c++二进制文件读写的程序举例
- Linux
- httpd 13 permission denied make_sock could not bind to address 失败的原因
- css整理
- 100亿数据1万属性数据架构设计
- spring <context:component-scan>使用说明
- AJAX跨域的常见方法
- [C++] 实现二叉搜索树
- Android开源项目推荐之「图片加载到底哪家强」
- 【选择排序】和【堆排序】
- 设计模式-结构型软件设计模式(一)