我在Linux Debian 6上成功安装了Phusion乘客+ Apache 2 + Rails 3.1程序+ git。我运行了passenger-install-apache2-module并遵循configuration说明。 我也遵循https://help.ubuntu.com/community/RubyOnRails#Configure%20Apache中的设置说明 我的程序是在/ var / www / myrailsproject,并在我的Mac上运行罚款webrick。 当去myhomepage.com (例如)我只看到目录列表。 通过阻止目录列表并在/ etc / apache2 / sites-available default或myhomepage.com中的<Document>标记中设置Options -Indexes我在我的网站上遇到错误: 禁止您无权访问/在此服务器上。 Apache / 2.2.19(Debian)服务器在myhomepage.com端口80 在/etc/apache2/apache.conf中我添加了: ServerName myhomepage.com LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.8/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.8 PassengerRuby / usr /bin/ruby1.8 在/ etc / apache2 / sites-available myhomepage.com : <VirtualHost *:80> ServerName myhomepage.com ServerAlias […]
我有一个Ubuntu的10.04服务器,我已经从存储库安装nginx: apt-get install nginx 我有我所有的网站运行,我想安装redmine,但我有旅客的问题。 我已经安装乘客,但我可以将它添加到nginx,因为我没有源,所以我不能使用: passenger-install-nginx-module 这会打破我目前的nginx安装? 有没有办法安装乘客模块? 我可以在同一台机器上运行两个nginx服务器,不同的端口吗?我可以在另一个端口的nginx上安装redmine。 谢谢你们。
我用rvm 1.9.2安装了乘客,但是在加载任何东西的时候出现错误。 (我们很抱歉,但是出现了一些问题)。 我能够从公共目录加载一个txt文件。 它看起来像乘客正在工作: jon@ve:~$ apache2ctl -t -D DUMP_MODULES Loaded Modules: … passenger_module (shared) Syntax OK jon@ve:~$ 在顶层的apache错误日志中,我看到非描述: cache: [GET /jt] miss [Tue Sep 27 13:36:50 2011] [notice] caught SIGTERM, shutting down 虚拟主机容器是: <VirtualHost *:80> ServerName domain.com ServerAlias www.domain.com DocumentRoot /var/www/testapp/public </VirtualHost> 下一个要看的地方是什么?
我有一个3.1.0 Rails应用程序(机架1.3.3)运行在一个Cantos 5.6虚拟机使用Apache和Passenger 3.0.9 – 所有最近安装。 一切都完美无缺,除非偶尔会有一些请求长时间延迟。 大多数时候,相同的请求很快。 它发生在POST和GET请求上。 对于一个随机的长延迟请求,apache access_log,error_log和rails日志都会立即响应tail -f。 但是在浏览器中的响应是非常迟缓的。 在Chrome中,networking时间轴图表显示,它正在等待很长一段时间(15秒)。 在延迟之后,所有的东西都照常显示。 apache error_log显示了这样的行: cache: [GET /subprojects/new] miss 这可能是问题吗? 可能是什么原因/修复? 我不确定问题出在哪里,所以不知道接下来要做什么。 任何想法或build议? 提前谢谢了。 🙂
有时候,当我尝试通过发送HUP到Nginx来进行优雅的重启时,我终于得到了一个永不停息的主进程,它永远停留,最终我的应用程序变得没有响应,我必须重新启动。 从来没有多余的工作进程。 这并不总是发生,我不知道如何可靠地重现。 我正在用Phusion Passenger运行Nginx。
要设置Passenger,必须安装一些软件包,例如libcurl4-openssl-dev: user@ubuntu:~$ sudo apt-get install libcurl4-openssl-dev Reading package lists… Done Building dependency tree Reading state information… Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of […]
我使用apache2来托pipeowncloud。 我为owncloudconfiguration了一个vhost文件,但是每次我去浏览器时,我的浏览器都会下载一个ruby文件。 这是我的虚拟主机configuration: <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName http://rsserver.fritz.box DocumentRoot /var/www/owncloud/ <Directory /var/www/owncloud/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # […]
我在我的Apacheconfiguration(不是在一个虚拟主机,但全球)有以下设置: RailsSpawnMethod smart RailsAppSpawnerIdleTime 0 PassengerMinInstances 2 PassengerMaxPoolSize 5 PassengerPoolIdleTime 120 但不知何故,每次我访问我的gitlab子域时,一旦超过空闲时间,永远加载。 使用PassengerPreStart指令时,启动也一样。 根据我的理解, PassengerMinInstances 2应该防止乘客完全closures,所以一旦乘客被装载并且阿帕奇没有重新启动,应该有0等待时间。
我正试图在Bluehost上build立一个Rails网站,而且我在path助手方面遇到了麻烦。 由于我不想猴子补丁Rails,我试图通过.htaccess来解决这个问题。 这是一个场景: 我在public_html/engradado www.engradado.com上托pipewww.engradado.com ,指向rails_apps/engradado/public 我正在通过这个public_html/.htaccess文件重写www.engradado.com指向www.engradado.com/engradado : # BlueHost.com # .htaccess main domain to subdirectory redirect # Copy and paste the following code into the .htaccess file # in the public_html folder of your hosting account # make the changes to the file according to the instructions. # Do not change this line. RewriteEngine […]
我正尝试通过使用X-Accel-Redirect nginx和rails来提供静态内容。 我的实际静态内容directort位于rails根文件夹,就像这个rails_root\books 。 这是我的nginxconfiguration文件映射URL与实际的文件位置 server { listen 3000; server_name 127.0.0.1; passenger_enabled on; root /home/voodoo/work/reader/public; location ~ /read/*./.* { internal; alias /home/voodoo/work/reader/books/sources/$1/$2; } location / { proxy_redirect off; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; passenger_pass_header X-Accel-Redirect; passenger_set_cgi_param HTTP_X_ACCEL_MAPPING /read/=/home/voodoo/work/reader/books/sources/; proxy_pass http://127.0.0.1:3001/; } } 和一个相应的轨道控制器 class ReaderController < ApplicationController def resource send_file "#{Rails.root}/books/sources/"+ […]