Search code examples
ruby-on-railsunicorn

unicorn production configuration


I see my unicorn error file growing, and I can't find out why.
It log some path but when I try them on my browser, I don't see any issue neither redirection.

I'm using rails and this is a snippet of my unicorn production conf file:

stderr_path "log/unicorn.error.log"
stdout_path "log/unicorn.log"

One line from the error log file:

xxx.xxx.xxx.xxx, yyy.yyy.yyy - - [16/Mar/2019:20:13:54 +0100] "GET /fr/yyyyyyy HTTP/1.0" 200 - 0.0926

I thought 200 means that it was OK, but why do I see HTTP/1.0 when my site is only https?
More over, why do I get all those log entries when all the reported errors are working correctly for me?
Is there a way to format log so that I can get more info on error?


Solution

    • HTTP/1.0 is the protocol, this does not imply that your site is not using HTTPS.
    • By default, the Unicorn logger will write to stderr. So these are not errors, just logs of requests coming in.

    Refer this for unicorn configuration options and their meanings - https://github.com/phusion/unicorn/blob/master/examples/unicorn.conf.rb