ast*_*nic 2 virtualhost centos5 symlink apache-2.2
我的 apache 服务器以用户 foo 运行。
我在 /home/foo/app1 /home/foo/app2 中有一些 Rails 应用程序。他们每个人都有一个虚拟主机
<VirtualHost *:80>
ServerName app1.foobar.com
ServerAlias www.app1.foobar.com
DocumentRoot /var/www/html/app1/current/public
RailsEnv production
<Directory /var/www/html/app1/current/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
我在 /var/www/html/app1 中有一个符号链接:
current -> /home/foo/app1/tmp_20102611
Run Code Online (Sandbox Code Playgroud)
所有文件权限都设置正确(用户 foo 组 foo),我可以从 shell 浏览文件系统。
SELINUX 被禁用
发行版是 CentOs 5.5
上面的符号链接我在 error_log 中得到一个 403 和一个错误条目
不允许符号链接或链接目标不可访问:/var/www/html/app1/current
当我在 /var/www/html 而不是 /home/foo 的子目录中符号链接我的应用程序时,它可以工作。
如何避免此错误仍然将我的应用程序放在我的 /home/foo 目录中?
我有一个非常相似的问题。像你一样,即使我启用了 FollowSymlinks 并且我可以与我的 http 用户一起使用,我也无法关注我的主目录下的符号链接,但是将符号链接放在 /srv/http 下工作得很好......我通过 chmod' 修复了它将我的主目录设为可执行:
chmod +x /home/mgalgs
Run Code Online (Sandbox Code Playgroud)
这为我做到了!也许试试
chmod +x /home/foo/app1
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
12822 次 |
最近记录: |