简体   繁体   English

在Heroku上使用Thin和SSL的Rails应用(Procfile)

[英]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. 我在Heroku上通过SSL使用Thin Web服务器运行Rails应用时遇到了一些问题。 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 ). 我认为可能引起我问题的一件事是,我没有使用ssl启动瘦服务器(如此此处所示)。 However, I do not know the correct syntax to boot a thin server using ssl on Heroku. 但是,我不知道在Heroku上使用ssl引导瘦服务器的正确语法。 Here are the different procfile variations I have tried with no luck: 这是我没有运气尝试过的不同procfile变体:

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. 在Heroku上,SSL会在请求到达您的应用程序之前终止。 You app will only see normal HTTP traffic. 您的应用只会看到正常的HTTP流量。 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/ . 我认为您不需要将任何参数传递给thin ,只需正常启动它即可,您应该能够使用https://example.herokuapp.com/通过HTTPS访问您的网站。

If you have a custom domain, there's more info in this Dev Center article on SSL endpoints . 如果您有一个自定义域,则此开发中心文章中有关SSL端点的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Chrome在我的Rails应用上使用thin要求为SSL选择“证书” - Chrome asks to “Select a Certificate” for SSL on my Rails app using thin Heroku rails Procfile - Heroku rails Procfile rails db:Procfile中的migrate导致应用程序在Heroku中崩溃 - rails db:migrate in Procfile causes app to crash in Heroku Rails Heroku从Procfile开始独角兽 - Rails Heroku starting Unicorn with Procfile 在Heroku上部署具有瘦服务器的Rails应用程序时出现“没有此类文件或目录”错误 - “No such file or directory” error when deploying Rails app with Thin server on Heroku SSL 无法建立安全连接 - 在 Heroku 中使用 Devise 的 Rails 6 应用程序 - SSL cannot establish secure connection - with Rails 6 app using Devise in Heroku 在Heroku上使用rails sync gem与Faye和Thin在生产模式下 - Using rails sync gem with Faye and Thin in production mode on Heroku 应该如何制作 Ruby on Rails/React Heroku 应用程序的 Procfile,以及如何处理 Heroku 应用程序的 Rails 部分? - How should the Procfile of a Ruby on Rails/React Heroku app be made, and how should one handle the Rails portion of a Heroku app? 与旅客一起回顾Procfile for Rails 4 App - Recap Procfile with Passenger for Rails 4 App Rails Heroku Sidekiq确认Procfile正在运行 - Rails Heroku Sidekiq Confirm Procfile is Working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM