Answer the question
In order to leave comments, you need to log in
How to connect ssl certificate to ruby on rails?
I registered the path to the certificate in nginx:
upstream lessonwebnew {
server unix:/home/admin/web/lesson-web-new/shared/run/unicorn.sock fail_timeout=0;
}
server {
listen 178.57.217.78:80;
ssl on;
ssl_certificate /etc/ssl/www_lesson-web_ru.crt;
ssl_certificate_key /etc/ssl/www_lesson-web_ru.key;
server_name lesson-web.ru www.lesson-web.ru;
root /home/admin/web/lesson-web-new/current/public;
try_files $uri/index.html $uri.html $uri @app;
location ^~ /assets/ {
expires max;
add_header Cache-Control public;
}
location @app {
proxy_pass http://lessonwebnew;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
}
error_page 500 502 503 504 /500.html;
location = /500.html {
root /home/admin/web/lesson-web-new/current/public;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question