nginx fails to load a file - ssl certificate - even if its clearly there
I'll bet nginx
is not running as root. The permissions you have on the key/cert pair is readable only by root.
I usually create a www
group and make the key root:www 440
and the cert root:www 444
(the cert is sent out publically for every connection; so there's no reason to keep it secret; just make sure it's uneditable). Then I make sure that apache
(or nginx
as you prefer) runs as www:www
.
--oh yah...
Make sure that you don't have a pass phrase on the key; or if you do (it ~is~ better security), make sure that nginx
has a provision to allow you to submit the pass phrase as you initiate it. (sorry, I've never tried to use nginx
). And then be prepared for it to hang and wait every time it restarts until you can reach the console.
The problem was the route, as you set /etc/gninx/ssl/server.crt; which should be /etc/nginx/ssl/server.crt;