Topic: Apache + Passenger deployment to localhost

Hello guys,

So far it has been really easy to test my apps on my own computer with the default rails server WEBrick, but as you probably know on a production environment it's better to get hands on experience on web servers such as Apache or Nginx. I'm trying Apache plus the Passenger gem, but I'm having problems trying to deploy a Rails app I have on my computer at home to a local Apache on the same computer. I edited the httpd.conf file as the guide says:

LoadModule passenger_module /home/jose/.rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.6/ext/apache2/mod_passenger.so
PassengerRoot /home/jose/.rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.6
PassengerRuby /home/jose/.rvm/wrappers/ruby-1.9.2-p136/ruby

<VirtualHost *:80>
  ServerName  localhost
  DocumentRoot /hamldemo/public
  <Directory /hamldemo/public>
    AllowOverride all              
    Options -MultiViews            
  </Directory>
</VirtualHost>
<Directory "/hamldemo/public">
  Options ExecCGI FollowSymLinks
  AllowOverride all
  Allow from all
</Directory>

But when I try to start Apache I'm getting the following errors:

Warning: DocumentRoot [/hamldemo/public] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

This, as you can see leaves me clueless as how to deploy a rails app locally. Is there a particular problem with using a localhost ?

Any help is certainly appreciated !

Best Regards,

Jose.

Re: Apache + Passenger deployment to localhost

Please close this thread, I have solved the problem and posted the walk-through in another topic.

Re: Apache + Passenger deployment to localhost

... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,
sudo gedit /etc/apache2/httpd.conf
By default httpd.conf file will be blank. Now, simply add the following line to the file.
ServerName localhost
Save the file and exit from gEdit. Finally restart the server.
sudo /etc/init.d/apache2 restart

Re: Apache + Passenger deployment to localhost

You know, you could post a link to the walkthrough.