我使用紅寶石1.9.3和rvm。我想用--ssl選項運行瘦服務器。我讀了一些答案,認爲運行「瘦開始-ssl」應該可以做到。 但在我的開發環境,當我運行瘦開始--ssl終端運行:運行「瘦啓動」時沒有收到數據
Using rack adapter
Thin web server (v1.5.1 codename Straight Razor)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
And in my web-browser in localhost:3000:
No data received
Unable to load the webpage because the server sent no data.
Here are some suggestions:
Reload this webpage later.
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
當我運行「軌道細瘦」相同的命令它雖然工作,具有不同的信息:
Booting Thin
Rails 3.2.11 application starting in development on http:// 0. 0. 0 .0 :3000
Call with -d to detach
Ctrl-C to shutdown server
我不知道爲什麼會發生這種情況(可能是因爲rvm),但瘦身正在進行中。我想運行第一個「瘦啓動--ssl」,因爲我不能在「rails s」命令中設置這個ssl選項。
你的瀏覽器返回什麼狀態碼?我想知道是不是因爲您沒有爲Thin設置SSL證書?你有沒有設置類似的東西? – jordelver 2013-03-22 16:21:40
那麼,我試圖運行瘦服務器的Rails服務器,並通過SSL證書建議在http://stackoverflow.com/questions/3604303/how-can-i-pass-ssl-options-into-rails-server-在護欄-3-0/7862689#7862689。但是,我收到狀態碼「錯誤107(net :: ERR_SSL_PROTOCOL_ERROR):SSL協議錯誤。」 – 2013-03-22 21:46:56