ruby - How to Serve Rails Web App with Apache and Passenger -
i serving eurohacktrip.org on digitalocean vps ubuntu12.04 , apache2.
here apache virtual host file it: /etc/apache2/sites-available/eurohacktrip.org
<virtualhost *:80> servername eurohacktrip.org serveralias eurohacktrip.org documentroot /var/www/eurohacktrip.org/public railsenv production passengerenabled on passengerapproot /var/www/eurohacktrip.org/ passengerruby /usr/local/rvm/gems/ruby-2.1.1/wrappers/ruby serveradmin webmaster@eurohacktrip.org <directory /> options followsymlinks allowoverride none </directory> <directory /var/www/eurohacktrip.org/public> options indexes followsymlinks multiviews allowoverride # order allow,deny allow </directory> scriptalias /cgi-bin/ /usr/lib/cgi-bin/ <directory "/usr/lib/cgi-bin"> allowoverride none options +execcgi -multiviews +symlinksifownermatch order allow,deny allow </directory> errorlog ${apache_log_dir}/error.log # possible values include: debug, info, notice, warn, error, crit, # alert, emerg. loglevel warn customlog ${apache_log_dir}/access.log combined alias /doc/ "/usr/share/doc/" <directory "/usr/share/doc/"> options indexes multiviews followsymlinks allowoverride none order deny,allow deny allow 127.0.0.0/255.0.0.0 ::1/128 </directory> and added these lines on /etc/apache2/apache2.conf
loadmodule passenger_module /usr/local/rvm/gems/ruby-2.1.1/gems/passenger-4.0.40/buildout/apache2/mod_passenger.so <ifmodule mod_passenger.c> passengerroot /usr/local/rvm/gems/ruby-2.1.1/gems/passenger-4.0.40 passengerdefaultruby /usr/local/rvm/gems/ruby-2.1.1/wrappers/ruby </ifmodule> and did
service apache2 restart but site still doesnt work : http://eurohacktrip.org/
strange enough works on 3000 http://eurohacktrip.org:3000
i had uncomment
gem 'therubyracer', platforms: :ruby and ran
bundle install but still no luck. missing?
loadmodule passenger_module /home/deployer/.rvm/gems/ruby-1.8.7-p374/gems/passenger-4.0.40/buildout/apache2/mod_passenger.so <ifmodule mod_passenger.c> passengerroot /home/deployer/.rvm/gems/ruby-1.8.7-p374/gems/passenger-4.0.40 passengerdefaultruby /home/deployer/.rvm/gems/ruby-1.8.7-p374/wrappers/ruby </ifmodule> <virtualhost *:80> servername yourservername railsenv production # !!! sure point documentroot 'public'! documentroot /home/user/apps/projects/myapp/public <directory /home/user/apps/projects/myapp/public> # relaxes apache security settings. allowoverride # multiviews must turned off. options -multiviews </directory> </virtualhost> if face problem follow link
http://nathanhoad.net/how-to-ruby-on-rails-ubuntu-apache-with-passenger
Comments
Post a Comment