我做了以下尝试使用Apache 2.2.21和Passenger 3.0.13来托pipeRails 3.2.3应用程序: 装gem乘客 rvmsudo乘客安装apache2模块 在/etc/apache2/extra/httpd-vhosts.conf中添加网站信息 在/ etc / hosts中添加了一行(不确定是否需要这样做;在Passenger文档中没有提及 取消注释掉/etc/apache2/httpd.conf中的行以包含/etc/apache2/extra/httpd-vhosts.conf 重新启动Apache 当我尝试拉起我的网站时,显示如下: Index of / Name Last modified Size Description Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.10 with Suhosin-Patch Phusion_Passenger/3.0.13 Server at lightbesandbox2.com Port 443 这里是网站的/ etc / hosts条目: 127.0.0.1 www.lightbesandbox2.com 这是我的/etc/apache2/extra/httpd-vhosts.conf条目的网站: NameVirtualHost *:80 <VirtualHost *:80> ServerName www.lightbesandbox2.com ServerAlias lightbesandbox2.com PassengerAppRoot /Users/server1/Sites/iktusnetlive_RoR/ DocumentRoot /Users/server1/Sites/iktusnetlive_RoR/public […]
说我有一个WordPress的网站: https://www.foobar.com 我想在同一个域内的某个子目录中有一个入口点: https://www.foobar.com/rails_app 我知道这是可能的,如果wordpress应用程序和rails应用程序托pipe在同一个盒子上,但是如果它们托pipe在不同的盒子上,这是可能的吗? 我不想使用子域名,因为我正在尝试允许从一个到另一个的Ajax发送请求,而不必处理单一来源策略的东西。
我们构build了一个由以下path组成的Rails应用程序: namespace :api do namespace :v1 do resources … end end 这意味着所有的控制器都可以通过www.url.com/api/v1/controller进行访问。 要在根域下运行独立的web应用程序,我有以下本地nginx设置: server { listen 8080; server_name localhost; location / { root /Users/swramba/Sites; index index.html index.htm; } location ~ /api { proxy_pass http://127.0.0.1:3000; } } 这意味着, /api下的所有东西都被代理到用于开发的WEBrick服务器。 现在,在我们的生产环境中,我们想用类似的设置来使用Phusion Passenger。 所以,我为生产nginx写了下面的configuration文件: server { listen 80; server_name localhost; root /home/someuser/sites/web/www.myapp.com; passenger_base_uri /api; passenger_enabled on; rails_env production; […]
我试图安装nginx通过RVM在Ruby 2.0.0-p0上运行带有Passenger(4.0.0.rc5)的Rails站点(3.2.13)。 我已经成功安装了Passenger Gem,但是在运行时: rvmsudo passenger-install-nginx-module 在“编译乘客支持文件…”步骤中出现以下错误: g++ -o agents/PassengerHelperAgent.o -Iext -Iext/common -Iext/libev -Iext/libeio -D_REENTRANT -I/usr/local/include -DHAS_TR1_UNORDERED_MAP -DHAVE_ACCEPT4 -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -ggdb -feliminate-unused-debug-symbols -feliminate-unused-debug-types -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -fcommon -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -c ext/common/agents/HelperAgent/Main.cpp g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed […]
我最近试图在nginx上安装乘客。 安装工作,一切都很好。 不过,我想在我的服务器上运行roundcube webmail。 基本上我的问题是,nginx的根指令设置为乘客应用程序: root /home/me/www/hello/public 并且将roundcube创build为服务器上的符号链接,如下所示: /home/me/www/webmail 我的问题如何获得URL www.my-server.com引用正常的根,但www.my-server.com/webmail引用roundcube文件夹? 我已经试过在我的nginx.conf中没有运气的变化: location /webmail/ { #root /home/me/www; alias /home/me/www; try_files $uri /index.php; passenger_enabled off; } 当使用www.my-server.com/webmail时,上述configuration导致403禁止,使用URI:www.my-server.com/webmail/index.php时找不到File。 有任何想法吗?
我在Fedora 18上安装了Redmine。使用webrick进行testing时,安装工作正常,正如在官方的“HowTo”中所解释的。 现在我想用Passenger和Apache来托pipeRedmine。 我得到的是: 乘客错误#2尝试访问“/var/www/redmine/config/environment.rb”时发生错误:无法统计'/var/www/redmine/config/environment.rb':权限被拒绝(错误= 13) Apache对该文件没有读取权限。 请修复相关的文件权限。 在几次尝试解决问题之后,我把包含内容的整个/var/www/redmine目录的所有权交给了apache用户,并将权限recursion地更改为777.我向apache用户发送了su命令, environment.rb文件没有任何问题。 所以我觉得毕竟这不是一个权限问题,但是面对这个明确的错误信息,我不知道。 这里可能是什么问题,以及如何解决它的任何想法(最好是一个解决scheme,使我可以将权限更改回合理的价值)? 脚注 : 这可能与这个问题有关 。 我没有忘记更改权限后重新启动Apache。 我正在运行httpd版本2.4.4-2.fc18,Phusion Passenger版本4.0.4 Redmine版本2.3.1。
我在互联网上search了一段时间,我没有find解决scheme,所以我在这里问:我的问题是,为什么这个文件( /etc/init.d/nginx )不能执行? 我昨天跟着亚历克斯的教程,我遇到了一个问题。 一切工作,直到service nginx restart命令。 当我尝试运行这个命令,我会得到 nginx: You don't have permissions to execute nginx. 在Google上search了一段时间之后,我发现了一个潜在的答案,但是这已经在Alex的教程/演练中完成了: $ sudo chmod +x /etc/init.d/nginx 一些信息,如果你不想阅读教程: 我正在使用Nginx(正如您在阅读本文时所了解的那样) 它与Passenger一起安装,然后从头开始导入一个Nginx的初始化脚本和nginx.conf文件。 哦,我运行的是Debian,而不是Ubuntu,但那不应该是问题,或者? 所以,如果有人能帮助我,我将非常感激。 谢谢!
当apache重新加载cofig文件时,乘客的所有实例都被停止并且必须重新生成,这就产生了一个问题,因为rails应用程序的产生并不是一个快速的过程。 有没有任何解决方法来防止这种行为?
我在一个centos 7 vm(内核3.10.0-229.7.2.el7.x86_64)中安装了redmine 2.6.6.stable。 到目前为止,这很好,但我目前无法上传文件。 Googling左右我发现Passenger写这些文件( https://www.redmine.org/issues/8817 ),它可能没有正确的写权限。 但我试图在过去的2个小时内修复它,但没有成功。 Apache的error_log当我尝试上传的东西: App 3419 stderr: Errno::EACCES (Permission denied – /var/www/html/vhosts/redmine/files/2015/08/150811151550_icon.png): App 3419 stderr: app/models/attachment.rb:108:in `initialize' App 3419 stderr: app/models/attachment.rb:108:in `open' App 3419 stderr: app/models/attachment.rb:108:in `files_to_final_location' App 3419 stderr: app/controllers/attachments_controller.rb:88:in `upload' 这些是我的redmine目录的当前权限: [root@server ~]# ls -l /var/www/html/vhosts/redmine/ total 44 drwxr-xr-x. 7 apache apache 78 Jul 7 16:47 app […]
我无法让Passenger在重新启动nginx时启动我的Nodejs(iojs)应用程序。 我已经按照教程安装了先决条件: $ nginx -V nginx版本:nginx / 1.8.0 configuration参数:–with-cc-opt =' – g -O2 -fstack-protector -param = ssp-buffer-size = 4 -Wformat ……… –add-module = / tmp / buildd / nginx-1.8 0.0 /的Debian /模块/乘客/ EXT / nginx的 在http块启用: passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini; passenger_ruby /usr/bin/passenger_free_ruby; passenger_nodejs /usr/local/bin/node; passenger_default_user staging; passenger_default_group www-data; 然后在服务器块中: upstream instance { # point to node instance […]