Topic: Apache + Passenger deployment to localhost
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 !