Gunicorn - HTTP and HTTPS in the same instance?
Lars Liedtke
liedtke at punkt.de
Mon Jan 10 05:28:56 EST 2022
server {
listen [::]:80;
listen 80;
server_name api.familie-liedtke.net;
location / {
return 301 https://$host$request_uri;
}
include /usr/local/etc/nginx/include/letsencrypt.conf;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name api.familie-liedtke.net;
ssl_certificate
/usr/local/etc/ssl/certs/api.familie-liedtke.net/fullchain.pem;
ssl_certificate_key
/usr/local/etc/ssl/certs/api.familie-liedtke.net/privkey.pem;
root /var/www/api;
location /weather/{
access_log /var/log/nginx/weather-access.log;
include uwsgi_params;
rewrite ^/weather(/.*)$ $1 break;
uwsgi_pass unix:///tmp/uwsgi.sock;
}
include /usr/local/etc/nginx/include/ssl.conf;
}
This is my config for a flask app on uwsgi. granted it is a bit more
than the 10 lines I said. But there is not much sophistication to it.
Am 08.01.22 um 17:25 schrieb Skip Montanaro:
> Thanks all. I was hoping to get away without something more
> sophisticated like NGINX. This is just a piddly little archive of an
> old mailing list running on a single-core Ubuntu VM somewhere on the
> East Coast. Speed is not a real requirement. Load balancing seemed
> like overkill to me. Still, I guess if it has to be, then it has to
> be.
>
> Skip
--
punkt.de GmbH
Lars Liedtke
.infrastructure
Kaiserallee 13a
76133 Karlsruhe
Tel. +49 721 9109 500
https://infrastructure.punkt.de
info at punkt.de
AG Mannheim 108285
Geschäftsführer: Jürgen Egeling, Daniel Lienert, Fabian Stein
More information about the Python-list
mailing list