0

Background: I have my web app running on unbuntu 18.04 + Apache & Passenger. I am using ruby 2.5 and rails 5.2. Right now the the project is running in development env.

Not sure if more info is needed so please ask. Thanks for anyone who can help. I am considering switching to NGINX and using ruby gem cap.

Question: I am trying to configure Passenger to run my rails app in Production, but I can only make it run in development env. When I try to make changes for production env, it just stops working...

after changes I am running

   sudo apache2ctl restart
   sudo service apache2 restart 

My .conf file

<VirtualHost *:80>
 ServerName dev1.example.net
 #ServerAlias dev1.example.net
 #ServerAdmin webmaster@localhost
 DocumentRoot /home/augustus/dev/xxx/public
 RailsEnv development
 PassengerRuby /home/augustus/.rbenv/versions/2.5.0/bin/ruby
 ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined
 <Directory /home/augustus/dev/xxx/public >
     # Allow from all
     AllowOverride all
     Options -MultiViews
     # Options FollowSymLinks
     Require all granted
</Directory>

:What I have tried I am setting the RailEnv to 'production' I have also reinstalled the repo completely I read over other stack overflow post's about this. I am not having issues getting it running, but just putting it in production. When I visit the webpage (www.example.com), it gives me the "we're sorry, but something went wrong"..

the most helpful link was

OS X: Development & Production Deployment for RoR with Apache and Passenger

&& passenger dox

https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/digital_ocean/apache/oss/bionic/deploy_app.html

Mason SB
  • 445
  • 1
  • 3
  • 13

0 Answers0