我尝试在CentOS 6上安装Phusion Passenger。按照https://www.phusionpassenger.com/library/install/apache/install/oss/el6/上的安装说明 最后一步是重新启动Apache,我得到了.. $ sudo service httpd restart Stopping httpd: [FAILED] Starting httpd: httpd: Syntax error on line 229 of /etc/httpd/conf/httpd.conf: Cannot load /usr/local/rvm/gems/ruby-2.2.2/gems/passenger-5.1.1/buildout/apache2/mod_passenger.so into server: /usr/local/rvm/gems/ruby-2.2.2/gems/passenger-5.1.1/buildout/apache2/mod_passenger.so: undefined symbol: ap_log_error_ [FAILED] 我核实发现mod_passenger.so是在错误信息目录中存在的。 然后我尝试用下面的命令进行validation,并得到这样的东西.. Final autodetection results * Found Apache 2.2.15! Information: apxs2 : /usr/bin/apxs Main executable: /usr/sbin/httpd Control command: /usr/sbin/apachectl Config file : /etc/httpd/conf/httpd.conf […]
我需要升级我的Redmine安装。 我在Mac OS X服务器10.6.8(不幸的是,这是一个给定的 – 不能现在更新系统到一个新的版本)。 在这个过程中,我遇到了安装Ruby新版本的问题(新的Redmine版本是必需的),最后是rbenv,现在它在系统上保留了所有的Ruby。 在更新乘客方面遇到了一些麻烦,直到我发现很久以前他们已经放弃了对10.6.8的支持。 我最终能够安装Passenger(及其Apache2模块),尽pipe我在升级之前运行的是同一版本 – 所以现在是Passenger 4.0.5。 但它正在运行,我也能够通过Passenger standalone确认我的应用程序(Redmine)仍然以更新的forms存在。 不过,我想通过Apache来服务Redmine,而我所得到的只是一个403错误,Apache日志中提到了以下内容: [Mon Feb 06 18:00:13 2017] [error] [client XXX.XX.XX.XXX] Directory index forbidden by Options directive: /Library/WebServer/Documents/redmine/ 这里是我的虚拟主机的conf文件的内容(somedomain隐藏我的主机名): <VirtualHost *:80> ServerName somedomain/redmine # !!! Be sure to point DocumentRoot to 'public'! DocumentRoot /Library/WebServer/Documents/redmine/public <Directory /Library/WebServer/Documents/redmine/public> # This relaxes Apache security settings. AllowOverride […]
我使用Node.js应用程序在Apache服务器(运行Ubuntu 16.04的数字海洋液滴)上实现Passenger。 Webpack成功地build立了静态的.js文件,并且Node成功地运行了启动。 但是,从浏览器访问该网站时,出现Cannot find module 'app/path/to/file' 。 我的应用程序使用NODE_PATH环境variables将应用程序源设置为./src因此在导入语句中,我不必将path设置为src/app/path/to/file ,而只是将app/path/to/file 。 但是,Passenger正在修改NODE_PATHvariables,并且在发出页面请求时,Node会使Passenger崩溃,因为NODE_PATH不再设置为./src (但是,在Node启动和Webpack构build期间, NODE_PATH=./src是因为Passenger不参与这些过程)。 所以我的问题是,什么是设置NODE_PATH=./src但仍然保持相同的效果(即src/app/path/to/file => app/path/to/file )的替代方法。
情况如下:我使用nginx + passenger将Ubuntu应用服务器上的rails应用程序迁移到带有apache2 +的debian服务器上。 一切都很好,直到我们testing了一些带有handlebars.js和其他脚本的ajax函数加载模板。 这是抱怨的JavaScript调用,所以我安装了一个nginx虚拟主机服务端口8080.然后在Apache虚拟主机上的Apache代理configurationredirect到监听端口8080的nginx服务器。原始服务器工作正常与Nginx,所以我尽pipe这应该起作用,而且确实如此。 但最近我们testing了更多的应用程序菜单,发现它不能上传文件,但是如果我从虚拟主机configuration中删除代理线,这是在apache2上工作。 这是Apache2虚拟主机文件: <VirtualHost 217.13.81.93:443> ServerAdmin [email protected] ServerName design-union.co.uk ServerAlias www.design-union.co.uk vu2029.admin.tantosoft.com LogLevel error ErrorLog /var/log/apache2/design-union.co.uk/error.log #DocumentRoot /var/www/virtual/design-union.co.uk/htdocs DocumentRoot /var/www/virtual/design-union.co.uk/htdocs/current.new/public PassengerLogLevel 3 Alias /errors /var/www/virtual/design-union.co.uk/errors/ SuexecUserGroup vu2029 vu2029 #SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1 <FilesMatch ".+\.ph(p[3457]?|t|tml)$"> SetHandler "proxy:unix:/var/run/php5-fpm-design-union.co.uk.sock|fcgi://design-union.co.uk/" </FilesMatch> <Directory /var/www/virtual/design-union.co.uk> Options +SymLinksIfOwnerMatch Require all granted </Directory> <Directory /var/www/virtual/design-union.co.uk/htdocs> AllowOverride All Options […]
我试图运行一个相对简单的rails应用程序(http:// www.enkiblog.com/),它有点作品。 当我使用“脚本/服务器-e生产”并连接到端口3000(但仍处于生产模式)时,注释和pipe理界面才起作用。 Nginx将在他的error.log中有这个: 2009/06/02 21:46:10 [error] 11536#0: *18 upstream prematurely closed connection while reading response header from upstream, client: 85.180.23.43, server: *.marc-seeger.de, request: "GET /admin HTTP/ 1.1", upstream: "unix:/tmp/passenger.11520/master/ helper_server.sock:", host: "www.marc-seeger.de" *** Exception NoMethodError in application (undefined method `each' for nil:NilClass) (process 14080): from /opt/ruby-enterprise-1.8.6-20090421/lib/ruby/gems/1.8/ gems/passenger-2.2.2/lib/phusion_passenger/rack/request_handler.rb: 85:in `process_request' from /opt/ruby-enterprise-1.8.6-20090421/lib/ruby/gems/1.8/ gems/passenger-2.2.2/lib/phusion_passenger/abstract_request_handler.rb: 203:in `main_loop' […]
是否可以安装两个模块的PHP和铁路乘客? 我首先安装了libapache2-mod-php5,当我尝试安装libapache2-mod-passenger时,它会尝试删除php模块。 有没有其他方式如何使PHP和Rails在单个Apache安装? 编辑:我使用Ubuntu的x64 Jaunty
我试图设置Apache和乘客服务的Rails应用程序。 不过,我也需要它来提供非公开目录中的静态文件,并优先于这些静态文件在Rails应用程序中的任何东西。 Rails应用程序位于/home/user/apps/testapp和/home/user/public_html的静态文件。 由于各种原因,静态文件不能简单地移动到Rails公用文件夹。 另请注意,根目录http://domain.com/应该由public_html文件夹中的index.html文件提供。 这是我正在使用的configuration: <VirtualHost *:80> ServerName domain.com DocumentRoot /home/user/apps/testapp/public RewriteEngine On RewriteCond /home/user/public_html/%{REQUEST_FILENAME} -f RewriteCond /home/user/public_html/%{REQUEST_FILENAME} -d RewriteRule ^/(.*)$ /home/user/public_html/$1 [L] </VirtualHost> 这对Rails应用程序来说很好,但是对于来自public_html的任何静态内容给出了404。 我也尝试了一个使用DocumentRoot /home/user/public_html的configuration,但是根本不提供Rails应用程序,可能是因为Passenger不知道处理请求。 有趣的是,如果我将条件更改为!-f和!-d,并将重写规则更改为redirect到另一个域,则按预期工作(例如http://domain.com/doesnt_exist被redirect到http://otherdomain.com/doesnt_exist ) 我如何configurationApache来提供这样的静态文件,但允许所有其他请求继续乘客?
这是一个不起作用的URL的例子: http://domain/do?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Fperson http://domain/do?url=http%3A%2F%2Fwww.linkedin.com%2F 但是,下面的URL可以工作: http://domain/do?url=http%3A%2F%2Fwww.linkedin.com 而且,这只发生在Nginx上,使用Passenger和Apache一起工作,但是我们在我们的生产机器上使用了Nginx。 这里是Nginx的错误日志中的条目: 2009/12/01 09:30:51 [error] 6407#0: *136 upstream prematurely closed connection while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: domain, request: "GET /do?url=http%3A%2F%2Fwww.linkedin.com%2F HTTP/1.1", upstream: "passenger://unix:/tmp/passenger.6335/master/helper_server.sock:", host: "domain"
我最近推出了一个运行phusion乘客的网站。 不幸的是,该网站由于冻结的线程而下降。 我可以通过对特定的PID执行kill -9来保存服务器。 尽pipe如此,我还是觉得乘客能够自动pipe理这个。 我有一个服务器与1GB的内存运行一个轨道应用与乘客分配多达7个实例。 但是当我发现这个网站发生故障时,我发现乘客已经产生了6个实例,其中一个实例使用了超过800MB的内存,导致服务器交换。 因此,我希望在服务器上安装bluepill之类的东西,但是我对于如何去做这件事感到有点困惑。 主要是因为bluepill希望启动/停止正在监控的进程。 但是,在我们的情况下,乘客已经为我们重新启动了程序,所以我们只需要监控乘客的情况,一旦他们变得太大,就杀了他们。 有没有人在这里设置BluePill来监视在phusion的乘客下运行的rails应用程序? 任何见解都会有用。
我正在尝试在Ubuntu服务器上使用Passenger和Apache来提供Rails应用程序。 Passenger安装说明说我应该添加以下到我的Apacheconfiguration文件 – 我认为这是/etc/apache2/httpd.conf。 <VirtualHost *:80> ServerName www.yourhost.com DocumentRoot /somewhere/public # <– be sure to point to 'public'! <Directory /somewhere/public> AllowOverride all # <– relax Apache security settings Options -MultiViews # <– MultiViews must be turned off </Directory> </VirtualHost> 但是,我还没有一个域指向我的服务器,所以我不知道我应该为ServerName参数。 我已经尝试了IP地址,但是当我这样做,重新启动Apache给 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for […]