拋出沒有錯誤,但是默默地存在問題。扭曲的端口80需要手動端口80並且不能正常工作
當我運行與蟒蛇通常的服務器
python -m http.server 80
它工作正常,我可以用localhost
或127.0.0.1
訪問服務器,但是當我嘗試運行安全的扭曲服務器
twistd -no web --path=. --https=80 --certificate=../cert.pem --privkey=../key.pem
並嘗試通過瀏覽器訪問localhost
或127.0.0.1
我的瀏覽器無法連接,我必須使用https://localhost:80
或https://127.0.0.1:80
進行連接。
這裏的服務器啓動輸出:
twistd -no web --path=. --https=80 --certificate=../cert.pem --privkey=../key.pem
2016-11-14T17:41:47+1100 [twisted.application.app.AppLogger#info] twistd 16.5.0 (c:\python35\python.exe 3.5.0) starting up.
2016-11-14T17:41:47+1100 [twisted.application.app.AppLogger#info] reactor class: twisted.internet.selectreactor.SelectReactor.
2016-11-14T17:41:47+1100 [-] Site (TLS) starting on 80
2016-11-14T17:41:47+1100 [twisted.web.server.Site#info] Starting factory <twisted.web.server.Site object at 0x03028E50>
2016-11-14T17:41:47+1100 [-] Site starting on 8080
但我也不能得到正常的HTTP服務器上的端口80
這是我現在的問題。
1)我怎樣才能讓客戶連接沒有尾隨:80
?
'https:// localhost:80 /'* correction。 – Luke