Ruby on Rails Saturday, July 7, 2018

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

No comments:

Post a Comment