【问题标题】:Installed Phusion Passenger on Server but apache2 didn't install in /etc/apache2/在服务器上安装了 Phusion Passenger 但 apache2 没有安装在 /etc/apache2/
【发布时间】:2010-07-30 21:45:33
【问题描述】:

我正在按照说明如何在服务器上部署 Rails 应用程序。

我做了以下事情:

sudo gem install passenger 
passenger-install-apache2-module

到目前为止,一切都很成功。但接下来他使用的指令是:

nano /etc/apache2/sites-enabled/000-default

问题是 etc 中没有 apache2 目录。因此,我不知道我需要粘贴此信息的文件在哪里:

<VirtualHost *:80> 
    ServerAdmin webmaster@localhost 

    ServerName www.mywebsite.com
    DocumentRoot /var/www/mywebsite/public 
    <Directory /var/www/mywebsite/public> 
            Options Indexes FollowSymLinks -MultiViews 
            AllowOverride all 
            Order allow,deny 
            allow from all 
    </Directory> 

    ErrorLog /var/log/apache2/error.log 

    LogLevel warn 

    CustomLog /var/log/apache2/access.log combined 

</VirtualHost>

感谢您的任何回复。

【问题讨论】:

    标签: ruby-on-rails ruby apache2 passenger


    【解决方案1】:

    Apache 是独立的,不会与 phusion 乘客一起安装。你需要自己安装它,它取决于你的操作系统(看起来你是在一个linux系统上),所以你可以在命令行中尝试这样的事情:

    apt-get install apache2
    

    【讨论】: