Once you’ve got your certs all setup you can add an entry to /etc/nginx/sites-available and then symlink it to /etc/nginx/site-enabled
An example snippet below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
server { listen 443; ssl on; ssl_certificate /home/deploy/.ssl/mydomain_combined.crt; ssl_certificate_key /home/deploy/.ssl/mydomain.key; server_name myawesomedomain.com; passenger_enabled on; rails_env production; root /home/deploy/apps/my-app/current/public; passenger_ruby /home/deploy/.rvm/gems/ruby-2.2.2@my-app/wrappers/ru$ access_log /home/deploy/apps/my-app/current/log/access.log; error_log /home/deploy/apps/my-app/current/log/error.log; # redirect server error pages to the static page /50x$ error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } |