简体   繁体   中英

Rails app using Thin and SSL on Heroku (Procfile)

I have been having some issues with running a Rails app using the Thin web server over SSL on Heroku. One thing that I think may be causing my issues is that I am not starting the thin server using ssl (such as shown here and here ). However, I do not know the correct syntax to boot a thin server using ssl on Heroku. Here are the different procfile variations I have tried with no luck:

web: thin start --ssl -p $PORT

web: bundle exec thin start --ssl -p $PORT

web: bundle exec rails s thin --ssl -p $PORT

web: thin start --ssl

On Heroku, SSL is terminated before requests hit your app. You app will only see normal HTTP traffic. I don't think you will need to pass any parameters to thin , just start it as normal, and you should be able to access your site over HTTPS using https://example.herokuapp.com/ .

If you have a custom domain, there's more info in this Dev Center article on SSL endpoints .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM