---
title: "apache 403错误 You don't have permission to access on this server "
author: "daweijsp"
date: "2010-09-27T22:54:47Z"
tags: ["Access", "Apache", "Blog", "HTML", "浏览器"]
categories: ["编程语言"]
slug: "apache-403-you-don-t-have-permission-to-access-on-this-server"
draft: false
lastmod: "2010-09-27T22:54:47Z"
id: 773670
url: "https://daweijsp.iteye.com/blog/773670"
---

apache 403错误 You don't have permission to access on this server.

在配置好了Apache服务器后，测试已经通过了，但是通过浏览器访问localhost时，出现403错误提示，  
Forbidden  
You don't have permission to access / on this server  
请教出现这个问题的原因是什么呢？如何解决？

这是由于你更改了你的DocumentRoot，而更改了这个默认值后，下面还有一个值是要随着更改的。就在它下面不远的地方，有这样一段：  
\#  
\# This should be changed to whatever you set DocumentRoot to.  
\#  
&lt;Directory "\\Your\_New\_DocumentRoot\\"&gt;  
中括号里的内容就是你更改的新值。这样就不会出现403错误了。

&lt;Directory "/var/www/html1/"&gt;  
Options Indexes FollowSymLinks  
AllowOverride None  
Order allow,deny  
Allow from all  
&lt;/Directory&gt;

\-----------------------------------------------

**http://hi.baidu.com/vking/blog/item/bc50f3d380296adfa9ec9af4.html**  
**apache昨天调试了一下午，都没有解决这个问题，到今天上午，仔细检查了一遍配置文件httpd.conf，找到这么一段：**  
**&lt;Directory /&gt;**  
     **Options FollowSymLinks**  
     **AllowOverride None**  
     **Order deny,allow**  
     **deny from all**  
     **Satisfy all**  
**&lt;/Directory&gt;**  
**然后试着把deny from all中的deny改成了allow，保存后重起了apache，然后再一测试我的网页，哈哈！居然问题就出在这，访问测试网站完全正常了**