-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding ssl support to waitress #287
Comments
See #86 (comment) Until then, you can set up another server in front to handle TLS, and proxy to waitress. nginx is one popular choice. |
@stevepiercy I have used nginx as reverse proxy for TLS so request flow will be like |
@brightening-eyes @j4mie @kgaughan @pjenvey anyone one of you could you please comment on above question? |
Please provide a reproducible example configuration, as well as log files of both nginx and waitress that indicate a request bypasses nginx and hits waitress only. This sounds like a misconfiguration of nginx. |
@stevepiercy I am having setup on windows i have referred below link |
That configuration is not what you want. Here is one that is closer to what you want. It is slightly more complex (2 nginx config files, one for server wide, the other for the app), uses Pyramid instead of Flask (that does not matter), and includes sections on pserve and Supervisord that you can ignore. |
@stevepiercy but in my case, I wanted to access flask API only using, HTTPS( secure) I don't want to access it by HTTP from the browser is there any way to achive it. |
Add a redirect to that sample configuration within the server {
listen 80 default_server;
listen [::]:80 default_server;
# Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
return 301 https://$host$request_uri;
} |
listen 80 default_server; |
@stevepiercy
server {
}
|
That's not the configuration I suggested. |
Will try |
But if I try using above link |
This is not an issue with waitress, but with how to configure SSL with nginx. Please consult their documentation. |
@onkar6699 the issue is that you're configuring waitress to be publicly accessible by telling it to allow traffic from 0.0.0.0. Set the |
hi,
if waitress provide a way to specify public and private keys for ssl it would be cool using ssl_context, or ssl_context='adhoc' which werkzeug provide by generating a certificate.
The text was updated successfully, but these errors were encountered: