Articles of phusion passenger

每个连续的请求服务器速度较慢

应用程序堆栈(全部使用最新的稳定版本): Ubuntu的 阿帕奇 乘客 ruby Ruby on Rails 重新启动Apache(apache2ctl优雅)后,一个页面请求是相当快,大约600毫秒。 然后,对于每个请求(同一页仍然只是重新加载),页面加载时间每个请求250-500毫秒。 所以在20个要求之后,我在10秒左右加载了相同的页面。 看轨道日志和webkit检查器的加载时间,他们上升。 页面加载是简单的GET,即没有额外的数据。 任何想法可能是什么原因呢? 另外,让我知道是否应该详细说明任何事情。 第二页面载入: Rails日志摘录 Started GET "/categories" for 214.200.52.199 at Mon Oct 25 20:38:02 +0000 2010 Processing by CategoriesController#index as HTML Rendered shared/sections/_settings.html.haml (101.6ms) Rendered layouts/_header.html.haml (172.0ms) Rendered layouts/_footer.html.haml (2.8ms) Rendered categories/index.html.haml within layouts/application (319.3ms) Completed 200 OK in 339ms (Views: 320.1ms) […]

Capistrano需要root密码才能部署 – 不好

我正在使用Capistrano部署到我的VPS(Ubuntu的Linode),似乎需要我的root用户的密码才能完成部分部署。 这是不好的,因为我看到它。 (我与nginx和乘客滚动。) 我recursion地部署目录和git仓库。 我的deploy.rb文件中唯一的exception是我运行bundle install和rake db:在deploy:update_code之后进行迁移。 下面是从部署相对(我相信)到根密码请求的输出: * executing `deploy' * executing `deploy:update' ** transaction: start * executing `deploy:update_code' updating the cached checkout on all servers executing locally: "git ls-remote deploy@mydomain:~/myapp.git master" * executing "if [ -d /home/apps/myapp/shared/cached-copy ]; then cd /home/apps/myapp/shared/cached-copy && git fetch origin && git reset –hard 8ea422656949f90cc27fd17cb31d68bbaeb33c6e && git clean […]

configuration问题与nginx,乘客和Ruby on Rails的“没有这样的文件加载 – configuration/环境”

我最近得到了一个Linode,并在Debian 5上跟随了关于如何在Nginx上设置Ruby On Rails的指南。 一切似乎设置正确(没有错误或问题后,该指南)。 我已经上传了我在本地工作的Ruby应用程序,更新了nginx.conf文件指向应用程序,现在出现错误: no such file to load — config/environment 请看这个屏幕捕获错误的全部细节。 我已经尝试更改environment.rb文件的权限。 我想我错过了一些非常基本的东西。 对于什么是值得的,该网站在Mac环境本地工作。 这是我的nginx日志的一个片段。 这里是我的nginx conf文件中的网站: server { listen 80; server_name *.mydomain.com; root html/simple_cms/public; passenger_enabled on; passenger_use_global_queue on; } 我在Linux环境和Ruby开发人员都是一个完整的新手。 所以,任何意见将很好地采取和非常感谢!

什么是这个phusion包装脚本在做什么?

if [[ -s "/usr/local/rvm/environments/ree-1.8.7-2010.02" ]] ; then source "/usr/local/rvm/environments/ree-1.8.7-2010.02" exec ruby "$@" else echo "ERROR: Missing RVM environment file: '/usr/local/rvm/environments/ree-1.8.7-2010.02'" >&2 exit 1 fi “ -s ”是做什么的? “ >&2 ”在做什么?

Apache2 SSL和Passengerconfiguration问题

我有以下虚拟主机configuration块。 <VirtualHost *:80> DocumentRoot /var/www/html/TestApp/public/ <Directory /var/www/html/TestApp/public/> Allow from all Options -MultiViews </Directory> </VirtualHost> NameVirtualHost *:443 <VirtualHost *:443> DocumentRoot /var/www/html/TestApp/public/ <Directory /var/www/html/TestApp/public/> Allow from all Options -MultiViews </Directory> SSLEngine on SSLCertificateFile /etc/pki/tls/certs/server.crt SSLCertificateKeyFile /etc/pki/tls/private/server.key </VirtualHost> 我试图在Apache上为客户提供Rails应用程序。 问题: 在不使用SSL的情况下,TestApp可以正常使用Apache和Passenger当我使用https:// ,我看到了/var/www/html TestApp的path是/var/www/html/TestApp 任何帮助都感激不尽。

Capistrano + Nginx + Passenger = 403

我也问过在stackoverflow,但仍然没有收到任何帮助我解决这个问题的答案。 为了解决这个问题,我花了差不多一个星期的时间,而且我还没有取得任何进展。 看来这个问题很常见,但是我在网上find的解决scheme都没有为我工作。 我的一个好友实际上正在创造相同的设置,而他也有同样的问题。 经过几天的403错误,我开始使用这个教程: http : //blog.ninjahideout.com/posts/a-guide-to-a-nginx-passenger-and-rvm-server 我曾希望从头开始使用本教程将工作,但没有骰子。 无论哪种方式,如果您查看教程,您可以看到我采取了哪些步骤。 这基本上是我正在做的事情。 我在linode.com上有一个VPS账户 服务器操作系统是Ubuntu 10.04 雪豹10.6.6本地操作系统(应该不会有问题,但只是你知道)用于部署与Capistrano 我在服务器上使用RVM 。 版本是1.2.2 我之前在ruby-1.9.2-p0 [i386]上,但根据上面列出的教程,我切换到了ree-1.8.7-2010.02 [i386] 。 从命令行运行' ruby 'validation我使用的是1.8.7,输出如下: /usr/local/rvm/rubies/ree-1.8.7-2010.02/bin/ruby 乘客-v打印以下内容: Phusion Passenger版本3.0.2 运行'nginx -v'会给我一个消息,说明命令nginx找不到。 服务器肯定在那里,正在运行,我可以使用nginx来提供静态文件,但这可能与我的问题有关。 我有两个用户处理安装。 我用来安装所有东西的根目录 ,以及部署我的应用程序的用户 我的web app目录位于部署者用户的主目录中,如下所示: /home/deployer/webapps/mysite.com/public 按照Capistrano默认部署,在公用文件夹中创build一个名为current的符号链接 ,并指向/home/deployer/webapps/mysite.com/public/releases/most_current_release 我已经recursion地将部署者目录chmod到777 / opt / nginx权限: rwxr-xr-x /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/passenger-3.0.2权限: rwxrwsrwx 我的nginxconfiguration文件已经经历了短暂的永恒变化,但目前看起来像这样: ================================================== ================================ worker_processes 1; events { […]

带有乘客设置问题的Nginx

我试图在Ubuntu 10.04(在子URI上)为Ruby on Rails应用程序提供Passenger支持来设置nginx webserver。 一切正常,直到我试图从浏览器访问服务器/应用程序。 我的nginx的安装位于/opt/nginx位置 # my nginx.conf server { listen 80; server_name www.mydomain.com; root /websites/site/public; passenger_enabled on; passenger_base_uri /site; location / { # added by default, I don't know if its supposed to be here or not root html; index index.html index.htm; } 然后我启动了服务器。 但是当我把www.mydomain.com/site放入浏览器时,我得到了404 Not Found错误。 Error.log显示这个: 2011/03/04 10:07:07 [error] 21387#0: […]

使所有的东西去https,除了在轨道,nginx,乘客一个url

嘿,我有一个Rails应用程序,我已经redirect几乎所有stream量使用https。 但是,我的应用程序中有一个特定的path,我需要通过纯http访问,比如somedomain.com/special 。 我想知道这是甚至可能的,因为我的Rails应用程序似乎在https块中定义。 也许如果有一些方法可以在http和https上进行托pipe,那么如果不是/special话,将所有stream量从httpredirect到https? (我也需要/RPC2在http上,但这不是一个轨道path,这就是为什么现在工作)。 任何build议,我将不胜感激。 如果您在configuration中看到任何明显的错误,如果您指出这些错误,我也会很感激! server { listen 80; server_name somedomain.com; location / { rewrite ^ https://somedomain.com$request_uri? permanent; } location /RPC2 { include scgi_params; scgi_pass 127.0.0.1:5000; auth_basic "app"; auth_basic_user_file /var/www/server/basic.auth; } } server { listen 443 default ssl; server_name somedomain.com; root /var/www/sites/app/current/public; passenger_enabled on; rails_env production; ssl_certificate /etc/ssl/certs/myssl.crt; ssl_certificate_key /etc/ssl/certs/myssl.key; ssl_protocols SSLv2 […]

默认文件权限(Passenger,Rails,Ubuntu服务器)

我部署了一个使用页面caching的Rails应用程序,并通过Ubuntu服务器上的Passenger运行。 Railscaching简单地使用Ruby的File.open来编写caching的文件。 不幸的是,这些文件正在使用模式666编写。所有适当的帐户的umask是022.还有什么可以检查,以确定是什么造成这种情况? 提前致谢。

的Centos +阿帕奇+的Phusion + REE = FAIL

我一直试图让Phusion Passenger在过去的几天里以5.6的速度运行,没有运气。 最初,我从RVM下的Ruby 1.9.2开始,因为基于RHEL的发行版的默认Ruby是相当古老的。 我已经安装好了,但遇到了一些问题。 认为这是RVM,我完全删除它与默认的Ruby和安装的Ruby企业版。 1.8.7.2011-03放入/ usr。 我仍然有相同的问题。 当我使用安装程序提供的默认设置说明尝试Passenger时,收到错误消息“无法findphusion_passenger / analytics_logger”。 我发现从谷歌这个很less的信息,但从我可以推测这是一个权限错误。 最初,我尝试设置一个ACL,允许apache用户访问乘客根目录。 如果不行的话,我尝试将passeneger根目录修改为777.接下来,我尝试根据用户指南的第6.3.5节将乘客根目录及其父目录的上下文更改为“httpd_sys_content_t”。 最后,我试着将SELinux设置为宽容。 没有工作。 阅读完用户指南后,我尝试了以下设置,导致500 ISE: PassengerUserSwitching off PassengerUser apache PassengerGroup apache 这是我的passenger.conf文件减去上面(从/etc/httpd/conf.d): LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7 PassengerRuby /usr/bin/ruby …. PassengerLogLevel 3 这是500错误的日志输出: [ pid=17939 thr=1094539584 file=ext/common/ApplicationPool/Pool.h:939 time=2011-04-30 13:12:17.351 ]: Spawning a process for /var/www/html because there are none for this […]