Download the nginx.conf file , take back up of your existing configuration and replace it . Steps to follow: 1. Add the number of worker process you need by default it should be 1. e.g worker_processes 4;2. Make sure that path of ssl_certificate & ssl_certificate_key are correct.3. Create dir/entry for access_log & error_log.4. In the upstream section you can configure your server address with port for https, like this
Here I am pointing to localhost port 3000 and added server_name 127.0.0.1 in Server Section of configurationNow , Start your rails server independent of application server in 3000 port and type https://localhost Your application Now runs on HTTPS . Thanks to Santosh for writing this post . REFER NGINX For more Details
upstream proxy_pass_server {
server 127.0.0.1:3000 fail_timeout=0;
}