I'm trying to configure lighttpd so that it serves static documents of my Ruby on Rails app, and also routes requests to my Ruby on Rails app servers.
This is the configuration I have so far:
$HTTP["host"] =~ "(^|www\.)brlafreniere.com$" {
proxy-core.protocol = "http"
proxy-core.balancer = "hash"
proxy-core.backends = (
"127.0.0.1:5000",
"127.0.0.1:5001",
"127.0.0.1:5002",
)
server.document-root = "/var/www/brlafreniere.com/public"
}
With this configuration in place, hitting brlafreniere.com in my browser results in 404 not found.
I did curl 127.0.0.1:5000
and received the expected response, the front page of my Ruby on Rails app.
I'm using the following script to start the app servers.
#!/bin/bash
RAILS_ENV=production rake assets:clobber assets:precompile
puma --pidfile /tmp/brlafreniere.com.1 --environment production --port 5000 > log/puma.log 2>&1 &
puma --pidfile /tmp/brlafreniere.com.2 --environment production --port 5001 > log/puma.log 2>&1 &
puma --pidfile /tmp/brlafreniere.com.3 --environment production --port 5002 > log/puma.log 2>&1 &
Is there a way I can tweak this to get more log output? The log output is not being very helpful. :)