我无法连接到https女服务员wsgi服务器 [英] I can not connect to https waitress wsgi server

查看:327
本文介绍了我无法连接到https女服务员wsgi服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试了python金字塔框架的教程但是,https连接,无论如何能够服务员。
http://docs.pylonsproject.org /projects/pyramid/en/latest/tutorials/wiki2/installation.html

I have tried the tutorial of python pyramid framework but, https connection, no matter how able to waitress. http://docs.pylonsproject.org/projects/pyramid/en/latest/tutorials/wiki2/installation.html

如果你查看女服务员的文件,有一个名为'的项目url_scheme'以pasteDeploy格式。我尝试将以下内容添加到development.ini中:

If you look at the documents of waitress, there is an item called 'url_scheme' in pasteDeploy format. I tried to add the following to development.ini:

# # #
# Wsgi server configuration
# # #

[server: main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
url_scheme = https

但是,似乎正在监听http连接执行pserve命令。

But, it seems to be listening for http connections be performed pserve command.

$ serve development.ini - reload
Starting subprocess with file monitor
Starting server in PID 2757.
serving on http://0.0.0.0:6543

在此状态下浏览器访问时没有响应。
我正在尝试创建的应用程序是期望https访问,但你认为还有其他东西所需的包。或者我在哪里根本错了?我很感激专家的建议。

There is no response when accessed by browser in this state. Application I'm trying to create is expecting a https access, but do you think there is a package needed for something else. Or Do I fundamentally wrong somewhere? I would appreciate the advice of experts.

fedora19环境,python 3.3.2。 virtualenv中包含以下软件包:

Environment in fedora19, python 3.3.2. the following packages that are included in the virtualenv:

Chameleon == 2.12
Mako == 0.9.0
MarkupSafe == 0.18
PasteDeploy == 1.5.0
Pygments == 1.6
SQLAlchemy == 0.8.2
WebOb == 1.2.3
coverage == 3.7
nose == 1.3.0
pyramid == 1.4.5
pyramid-debugtoolbar == 1.0.8
pyramid-mako == 0.2
pyramid-tm == 0.7
repoze.lru == 0.6
transaction == 1.4.1
translationstring == 1.1
tutorial == 0.0
venusian == 1.0a8
waitress == 0.8.7
zope.deprecation == 4.0.2
zope.interface == 4.0.5
zope.sqlalchemy == 0.7.3

请告诉我们文件的位置对我有帮助。
非常感谢!

Please tell us the location of the document would be helpful to me means. Thank you very much!

推荐答案

Waitress实际上并不支持解码https请求。支持https的唯一方法是将服务员放在反向代理(例如nginx)后面。然后,您允许nginx解密请求并将其传递给女服务员。这里的问题是女服务员现在认为它正在提供一个http请求,因为它是从nginx看到的。 url_scheme 设置用于告诉女服务员进入服务员的所有请求实际上都是https,然后它可以转发到应用程序,该应用程序使用该事实来帮助您的应用程序生成URL使用https方案而不是http。

Waitress does not actually support decoding https requests. The only way to support https is by putting waitress behind a reverse proxy such as nginx. You then allow nginx to decrypt the request and pass it on to waitress. The problem here is that waitress now thinks it's serving an http request because thats what it sees from nginx. The url_scheme setting is for telling waitress that all requests coming into waitress are actually https, which it can then forward on to the application, which uses that fact to help your application generate urls using the https scheme instead of http.

希望这是有道理的,但无论哪种方式,你应该清楚你的https设置在没有你的位置时不起作用你实际上已经创建了证书或私钥。

Hopefully that makes sense but either way it should be clear to you that your https setup is not going to work when no where in your pastes have you actually created a certificate or a private key.

这篇关于我无法连接到https女服务员wsgi服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆