Ruby on Rails Monday, July 9, 2018

I also use Passenger to manage a Rails app with Apache server. There is a great tutorial put out by Digital Ocean on getting it to  work: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-passenger-and-apache-on-ubuntu-14-04 pay close attention to the section on adding a new .conf file to your site-available folder for Apache.

On Sat, Jul 7, 2018 at 8:31 PM Phil Edelbrock <edelbrp@gmail.com> wrote:


On Jul 7, 2018, at 6:14 PM, Ralph Shnelvar <ralphs@dos32.com> wrote:

Hassan,

I am so embarrassed.  I have no idea where in all this code I start Rails.  It just seems to be running when I need it.

You are correct, I do have something called /etc/apache2/sites-available/000-default.conf

You wrote: "It loads all config at initialization"
So, to confirm, it does load all the *.conf files?

Ralph



Saturday, July 7, 2018, 3:08:28 PM, you wrote:

HS> On Sat, Jul 7, 2018 at 1:12 PM, Ralph Shnelvar <
ralphs@dos32.com> wrote:

>> I start Apache via ...
>>  sudo apache2ctl start

HS> But that's not starting Rails, unless you're running it via CGI
HS> which TBH is something I've never seen. Generally you'd be
HS> using mod_proxy to forward requests to your Rails apps.

>> In terms of sites-available ... where do I find the default host?
>> I do see something called
>>  /etc/apache2/sites-available

HS> You probably have a file called ~ '000-default.conf' with the
HS> directive <VirtualHost *:80> -- notice the lack of hostname
HS> and the wildcard * where you'd expect a name.

>> Does Apache look at all the *.conf files? If not, how does it know which
>> .conf file to look at?

HS> It loads all config at initialization and then matches the http request
HS> Host header to the server name.

HS> --
HS> Hassan Schroeder ------------------------
hassan.schroeder@gmail.com
HS> twitter: @hassan
HS> Consulting Availability : Silicon Valley or remote




Ralph


I use Passenger as the glue between Apache and Rails apps, pretty easy to install and configure.  The free version is often just fine for most.  You can have multiple Rails apps running in different environments (including multiple Ruby installs) if you needed to.  I found it pretty solid.

Info:


Or just 'gem install passenger' for the free version:


Good luck!


Phil




--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9090E8AA-35DB-4A57-8370-F2AC4C6184C6%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Brandon McClelland
User Support Technician
Steve Jackson Games

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADuEqH%2BOn0BG40snwph9Hu_C%3Df%2B8oQgEvWNCxJnfFFD_nWw_Yg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment