apache - "Symbolic link not allowed or link target not accessible"在新安装的 XAMPP for Linux 上

标签 apache xampp ubuntu-11.04 lampp

我在我的 Ubuntu 11.04 x64 笔记本电脑上全新安装了 XAMPP for Linux(版本 1.7.4)。
然后我在我的 htdocs 文件夹中创建了一个指向我的项目文件夹的链接:

$pwd
/opt/lampp/htdocs
$sudo ln -s /home/petra/projects/webapp webapp
$ls -al
drwxr-xr-x  4 nobody root 4096 2011-08-18 11:58 .
drwxr-xr-x 18 root   root 4096 2011-01-25 15:33 ..
lrwxrwxrwx  1 root   root   26 2011-08-18 11:42 webapp -> /home/petra/projects/webapp

当我使用 http://localhost/webapp 在浏览器中打开 webapp 时,它只显示“403 Access Forbidden”。错误日志说:
$tail -f /opt/lampp/logs/error_log
[Thu Aug 18 11:43:15 2011] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /opt/lampp/htdocs/webapp

这是httpd.conf .奇怪的是,FollowSymLinks选项已经定义(默认)。

有一个similar question on the XAMPP forum但我认为似乎没有人关注它了。

有谁知道如何解决这个问题?

最佳答案

尝试使用您的用户运行 Apache。

默认情况下,Apache 以“www-data”运行,因此编辑您的 apache2.conf,并搜索“user”并设置:

user=youruser

重启 Apache,瞧,它应该可以工作了。

关于apache - "Symbolic link not allowed or link target not accessible"在新安装的 XAMPP for Linux 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7102544/

相关文章:

java apache tomcat 没有检测到 jsp 文件,即使它存在

Apache,位置匹配 : match query string

windows-7 - ubuntu CLI 的 vmware 窗口大小

linux - qmake -query Linux 中的内部设置 - 它们在哪里?

php - 在一台机器上连接 XAMPP 到 microsoft sql server management studio 2012

c++ - Boost 1.59 链接器错误

linux - Logrotate 不旋转或创建新文件

php - 没有这样的文件或目录 : AH02291: Cannot access directory '/usr/logs/' for main error log AH00014: Configuration check failed

php - Mysql error #1932 "Table doesn' t exist in engine"after changing datadir in my.ini

windows - 当 XAMPP 不在分区的根目录中时,为什么它不能工作?