Supondo que você queira usar o
Snorby pelo
Apache, execute os passos abaixo:
# gem install passenger
# passenger-install-apache2-module
Vai aparecer o seguite:
This installer will guide you through the entire installation process. It shouldn't take more than 3 minutes in total.
Here's what you can expect from the installation process:
1. The Apache 2 module will be installed for you.
2. You'll learn how to configure Apache.
3. You'll learn how to deploy a Ruby on Rails application.
Don't worry if anything goes wrong. This installer will advise you on how to solve any problems.
Press Enter to continue, or Ctrl-C to abort.
Aperte "Enter" e deixe o processo continuar.
Então, ele faz outra perguta à você:
Which languages are you interested in?
Use <space> to select.
If the menu doesn't display correctly, press '!'
Ruby
Python
Node.js
Meteor
Escolha Ruby, ele vai compilar tudo e te retornar a seguinte saída para inserir no seu Apache.
Com as saídas obtidas vamos fazer a inserção no Apache. Insira as seguintes linhas no final do seu
httpd.conf.
# vi /etc/httpd/httpd.conf
LoadModule passenger_module /usr/lib64/ruby/gems/1.9.1/gems/passenger-4.0.53/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/lib64/ruby/gems/1.9.1/gems/passenger-4.0.53
PassengerDefaultRuby /usr/bin/ruby
</IfModule>
<VirtualHost *:80>
ServerAdmin admin@localhost
ServerName snorby.local
DocumentRoot /var/www/htdocs/snorby/public
<Directory "/var/www/htdocs/snorby/public">
AllowOverride all
Order deny,allow
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
Salve e feche o arquivo. Supondo que esteja dentro da pasta
/var/www/htdocs/snorby/, digite o seguinte comando:
# /usr/bin/ruby script/delayed_job start RAILS_ENV=production
Agora pode ir para seu navegador de digitar o IP do seu servidor:
http://ip.do.teu.servidor
... vai abrir normalmente Snorby pelo Apache.