403禁止在ec2上使用rails网站,即使文件权限为:lrwxrwxrwx

时间:2011-11-17 20:28:47

标签: ruby-on-rails-3 amazon-ec2 capistrano passenger

我正在尝试使用capistrano在ec2上部署rails网站,一切都运行完美但网站没有出现在broswer中 - 403 Forbidden

我收到此错误“不允许使用符号链接或链接目标不是 可以访问“。my blog提供更多详细信息。

==> /var/log/apache2/access.log< ==

76.103.107.80 - - [17/Nov/2011:07:36:47 +0000] "GET / HTTP/1.1" 200 483 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"
76.103.107.80 - - [17/Nov/2011:07:37:02 +0000] "GET / HTTP/1.1" 200 484 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"
76.103.107.80 - - [17/Nov/2011:07:37:02 +0000] "GET /favicon.ico HTTP/1.1" 404 504 "http://passionate4.net/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"
127.0.0.1 - - [17/Nov/2011:07:43:14 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 
(Ubuntu) (internal dummy connection)"
127.0.0.1 - - [17/Nov/2011:07:43:14 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [17/Nov/2011:07:43:14 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [17/Nov/2011:07:43:14 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [17/Nov/2011:07:43:14 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [17/Nov/2011:07:43:14 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [17/Nov/2011:07:43:14 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"

==&GT; /var/log/apache2/error.log< ==

[Thu Nov 17 13:50:56 2011] [error] [client 76.103.107.80] Symbolic link not allowed or link target not accessible: /var/www/apps/capi_app/current
[Thu Nov 17 14:48:59 2011] [error] [client 91.132.87.140] Symbolic link not allowed or link target not accessible: /var/www/apps/capi_app/current
[Thu Nov 17 14:48:59 2011] [error] [client 91.132.87.140] Symbolic link not allowed or link target not accessible: /var/www/apps/capi_app/current
[Thu Nov 17 18:38:26 2011] [error] [client 76.103.107.80] Symbolic link not allowed or link target not accessible: /var/www/apps/capi_app/current
[Thu Nov 17 18:38:27 2011] [error] [client 76.103.107.80] Symbolic link not allowed or link target not accessible: /var/www/apps/capi_app/current
[Thu Nov 17 18:38:46 2011] [error] [client 76.103.107.80] Symbolic link not allowed or link target not accessible: /var/www/apps/capi_app/current
[Thu Nov 17 18:41:22 2011] [error] [client 76.103.107.80] Symbolic link not allowed or link target not accessible: /var/www/apps/capi_app/current
[Thu Nov 17 18:45:15 2011] [error] [client 76.103.107.80] Symbolic link not allowed or link target not accessible: /var/www/apps/capi_app/current
[Thu Nov 17 19:14:31 2011] [notice] Graceful restart requested, doing restart
[Thu Nov 17 19:14:31 2011] [notice] Apache/2.2.16 (Ubuntu) Phusion_Passenger/3.0.9 configured -- resuming normal operations

==&GT; /var/log/apache2/other_vhosts_access.log&lt; ==

www.passionate4.net:80 76.103.107.80 - - [17/Nov/2011:18:41:22 +0000] "GET / HTTP/1.1" 403 499 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"
www.passionate4.net:80 76.103.107.80 - - [17/Nov/2011:18:45:15 +0000] "GET / HTTP/1.1" 403 499 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"
www.passionate4.net:80 127.0.0.1 - - [17/Nov/2011:19:14:31 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"
www.passionate4.net:80 127.0.0.1 - - [17/Nov/2011:19:14:31 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"
www.passionate4.net:80 127.0.0.1 - - [17/Nov/2011:19:14:31 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"
www.passionate4.net:80 127.0.0.1 - - [17/Nov/2011:19:14:31 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"
www.passionate4.net:80 127.0.0.1 - - [17/Nov/2011:19:14:31 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"
www.passionate4.net:80 127.0.0.1 - - [17/Nov/2011:19:14:31 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"
www.passionate4.net:80 127.0.0.1 - - [17/Nov/2011:19:14:31 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"
www.passionate4.net:80 127.0.0.1 - - [17/Nov/2011:19:14:31 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.2.16 (Ubuntu) (internal dummy connection)"

==&GT; /var/log/apache2/error.log< ==

[Thu Nov 17 19:40:01 2011] [error] [client 76.103.107.80] Symbolic link not allowed or link target not accessible: /var/www/apps/capi_app/current

==&GT; /var/log/apache2/other_vhosts_access.log&lt; ==

www.passionate4.net:80 76.103.107.80 - - [17/Nov/2011:19:40:01 +0000] "GET / HTTP/1.1" 403 526 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"

==&GT; /var/log/apache2/error.log< ==

[Thu Nov 17 19:40:01 2011] [error] [client 76.103.107.80] Symbolic link not allowed or link target not accessible: /var/www/apps/capi_app/current

==&GT; /var/log/apache2/other_vhosts_access.log&lt; ==

www.passionate4.net:80 76.103.107.80 - - [17/Nov/2011:19:40:01 +0000] "GET / HTTP/1.1" 403 501 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"

==&GT; /var/log/apache2/error.log< ==

[Thu Nov 17 20:04:37 2011] [error] [client 76.103.107.80] Symbolic link not allowed or link target not accessible: /var/www/apps/capi_app/current

==&GT; /var/log/apache2/other_vhosts_access.log&lt; ==

www.passionate4.net:80 76.103.107.80 - - [17/Nov/2011:20:04:37 +0000] "GET / HTTP/1.1" 403 499 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"

档案许可
ls -l /var/www/apps/capi_app/current

lrwxrwxrwx 1 ubuntu ubuntu 46 2011-11-17 19:04 /var/www/apps/capi_app/current -> /var/www/apps/capi_app/releases/20111117190420

1 个答案:

答案 0 :(得分:-4)

解决了此错误。我在我的博客上列出了详细信息。