简体   繁体   English

Debian Jessie Apache 2.4,运行PHP网站,并通过带有虚拟主机的Phusion Passenger添加Ruby on Rails

[英]Debian Jessie Apache 2.4 with PHP sites running & adding Ruby on Rails with Phusion Passenger with virtual hosts

Been at this for days, would appreciate any help. 在这里待了几天,将不胜感激。

I've got a web server (dev environment) which runs a few php sites on a working Apache 2.4 install (Debian 8). 我有一个Web服务器(开发环境),该服务器在有效的Apache 2.4安装程序(Debian 8)上运行一些php站点。

Now I've tried multiple configs primarily using the offical guide but when trying the Rails apps location URI it will just display the content of folders - as if passenger isn't firing up. 现在,我主要使用官方指南尝试了多种配置,但是当尝试使用Rails应用程序的位置URI时,它将仅显示文件夹的内容-好像乘客没有开火。

I've set up a helloapp (rails new helloapp) in my web folder at default (var/www/html/helloapp). 我已经在默认情况下(var / www / html / helloapp)的Web文件夹中设置了helloapp(使用新的helloapp)。 I want to reach it at localhost/helloapp. 我想通过localhost / helloapp到达它。 However, visiting that url just lists the directory. 但是,访问该URL仅列出目录。

The virtual host config: 虚拟主机配置:

<VirtualHost *:80>
ServerName localhost
DocumentRoot /var/www/html
<Directory /var/www/html>
    Allow from all
    Options -MultiViews
    # Uncomment this if you're on Apache >= 2.4:
    #Require all granted
</Directory>

# These have been added:
Alias /helloapp /var/www/html/helloapp/public
<Location /helloapp>
    PassengerBaseURI /helloapp
    PassengerAppRoot /var/www/html/helloapp
</Location>
<Directory /var/www/html/helloapp/public>
    Allow from all
    Options -MultiViews
    # Uncomment this if you're on Apache >= 2.4:
    #Require all granted
</Directory>

I want to run this at localhost, in a sub directory url just like the php sites. 我想像在php站点一样,在子目录url中的本地主机上运行它。 This way I can easily reach them internally and also on a external domain I've set up. 这样,我可以轻松地在内部以及已设置的外部域上访问它们。 Running rails s in the rails app folder worksaccording to the terminal (but can't reach it on webrack port 3000 either which seems default, no physical screen connected to server, only ssh shell). 在rails app文件夹中运行rails会根据终端运行(但似乎无法在webrack端口3000上访问它,这似乎是默认的,没有物理屏幕连接到服务器,只有ssh shell)。

welp, as of this writing, phusion passenger doesn't have official support for Debian 8 [or jessie]. 遗憾的是,截至撰写本文时,phusion乘客对Debian 8 [或jessie]没有官方支持。 There are a couple debian modules one could try ruby-passenger or apache2-mod-passenger, or even try compiling passenger yourself.. but there's little to no support out there for it, and my guess is you either have the old wheezy repos in your sources.list[.d] (which don't work) or otherwise no longer have passenger installed. 有几个debian模块,可以尝试使用ruby-passenger或apache2-mod-passenger,或者甚至尝试自己编译passenger ..但那里几乎没有支持,我想你可能是在拥有旧的Wheezy回购协议您的sources.list [.d](不起作用),否则将不再安装乘客。 Jessie was stabilized late last month. 杰西上个月下旬稳定下来。 Let's just hope Phusion Passenger takes notice and updates their support pages & repos. 我们只是希望Phusion Passenger能够引起注意并更新其支持页面和回购协议。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM