A
A
Alexander Petrov2016-10-20 14:42:37
Ruby on Rails
Alexander Petrov, 2016-10-20 14:42:37

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;
    }
}

I restart nginx but nothing works

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2016-10-20
@Mirkom63

listen 178.57.217.78:443;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question