【发布时间】:2011-08-11 22:04:21
【问题描述】:
我刚刚在我的 Arch Linux 系统上安装了 Xampp。我现在想做什么:
我的 PHP 工作目录位于我的主文件夹中(位于 /home/luke/PHP)。我希望 Apache 访问这两个文件,所以我关注了 Arch Linux Wiki 上的 Xampp Installation guide 并为此目录创建了一个别名。 这就是我的 httpd.conf(别名部分)的样子:
Alias /PHP /home/luke/PHP
<directory /home/luke/PHP>
AllowOverride FileInfo Limit Options Indexes
Order allow,deny
Allow from all
</directory>
之后,我将 home/luke/PHP 文件夹的权限更改为 777(使用 chmod)。当我尝试导航到 http://localhost/PHP
时,我重新启动了 Xampp 并得到了 403Apache-Server 在 http-User(存在)和 http-Group 下运行。因此,我在我的组中添加了 http-User(我的用户的组 luke,使用 chown 工具)。我重新启动了服务器,同样的错误。
这是error_log文件的(一部分):
[Sun Apr 24 18:05:37 2011] [error] [client 127.0.0.1] (13)Keine Berechtigung: access to /PHP/ denied
[Sun Apr 24 18:10:30 2011] [error] [client 127.0.0.1] (13)Keine Berechtigung: access to /PHP/ denied
[Sun Apr 24 18:10:30 2011] [error] [client 127.0.0.1] (13)Keine Berechtigung: access to /PHP/ denied
所以,我创建的别名应该可以工作,但是我需要做什么才能让 Apache 服务器可以访问我的 /home/luke/PHP 文件夹?
我也尝试在 htdocs 文件夹中创建符号链接,但这也不起作用。
【问题讨论】:
标签: linux apache permissions xampp alias