Questions tagged [flask]
136 questions
6
votes
2 answers
Apache 2.4 authenticate anonymous users but allow others by IP
I am trying to configure Apache to allow users from a selection of IPs access to a Flask application without authentication, but to challenge any other users for credentials.
As things stand I have the following configuration:
btongeorge
- 237
- 1
- 7
6
votes
3 answers
Nginx cannot see unix socket
UPDATE: I saw questions related to the /tmp directory, and a comment mentioned moving the socket out of /home as well. It didn't fix the problem.
(Additional updates at bottom of post)
I have a ubuntu 16.04 vm on azure I'm using to host a flask…
Ajacmac
- 106
- 1
- 6
5
votes
1 answer
In airflow's configuration file `airflow.cfg` what is the `secret_key`, and do I have to set it?
As a comment above the value, it says # Secret key used to run your flask app, but that doesn't tell me much. Currently it is set to secret_key = temporary_key, but that seems unsafe. We have set up password protection on the webservice, and it is…
André Christoffer Andersen
- 191
- 1
- 11
5
votes
1 answer
nginx + uwsgi - what is serving static files?
I am using nginx as a proxy to a couple of flask apps, with uwsgi as the middleware. Here's my nginx config for a test app.
server {
listen 80;
server_name test.myapp.com www.test.myapp.com;
charset utf-8;
…
reptilicus
- 153
- 1
- 1
- 5
3
votes
1 answer
Nginx change links to 127.0.0.1
I have a flask app running in a docker container, and I configured nginx to redirect all requests to this container. Here's my nginx config:
server {
listen 80;
location / {
proxy_pass http://127.0.0.1:5000;
proxy_redirect off;
…
Suanmeiguo
- 141
- 4
3
votes
3 answers
Nginx uWSGI responses truncated
I tried to write a web service as a joke today at http://dont-tread-on-memes.controversial.io. It's a flask app that serves fairly large images. The Flask app works well on its own, as does an independent uWSGI server, but when I try to plug uWSGI…
Luke Taylor
- 151
- 7
3
votes
1 answer
Docker, docker-compose application settings
I'm starting to migrate my Application to Docker containers:
I use Ngnix, supervisord, gunicorn, python flask, celery, flower, lighttpd, RabbitMQ and Postgresql.
In my original virtual machine, I keep all my configurations…
gogasca
- 313
- 2
- 15
3
votes
1 answer
Python background task thread lock error with mod_wsgi
I have a small python web application built on the Flask framework and deployed with mod_wsgi to apache. The application is scheduling a background task with apscheduler that runs every couple of minutes.
From the error log of apache I have been…
totokaka
- 202
- 2
- 8
2
votes
1 answer
Flask to uwsgi threading get stuck
im Using Python 3.7.3, uwsgi 2.0.18, (docker container image python:3-stretch)
We have development environment where we are running our code on flask and we change it to uwsgi when we test it on production.
Im running a py script which get…
Batchen Regev
- 131
- 1
- 6
2
votes
1 answer
failed (111: Connection refused) while connecting to upstream python
I am experiencing 502 Bad Gateway errors after deploying a python flask application using dokku on digital ocean. I followed this tutorial to deploy my app on digital ocean using dokku.
2018/10/23 07:40:59 [error] 28652#28652: *1 connect() failed…
Deschant Kounou
- 21
- 1
- 1
- 3
2
votes
0 answers
Systemd Unit file for uWSGI Failure
Using Flask, NGINX, and uWSGI I have setup successfully setup an app that I send and receive text messages through Twilio. Everything is working perfect, except that it is running under my personal user account (named trinitrogen). I'd like to move…
Trinitrogen
- 21
- 1
- 2
2
votes
1 answer
Can not start a Docker container
I Built an image using flask, nginx and uwsgi.
FROM ubuntu:14.04
MAINTAINER Ali Mezgani
RUN apt-get update && apt-get -y install python python-dev python-pip
RUN apt-get -y install supervisor
RUN apt-get -y install …
Ali Mezgani
- 3,810
- 2
- 23
- 36
2
votes
1 answer
Nginx + GUnicorn + Flask + www-data user - file lockdown
I have some pretty basic questions about I am deploying a Flask application in Gunicorn (19.0-1) on Ubuntu (14.10) in combination with Nginx.
Since this app sits along side to Web2Py, I followed a guide to locking down the website produced by Web2Py…
Donal Lafferty
- 186
- 6
2
votes
0 answers
uwsgi + nginx + flask: upstream prematurely closed after file is downloaded
I created an endpoint on my flask which generates a spreadsheet from a database query (remote db) and then sends it as a download in the browser. Flask doesn't throw any errors. Uwsgi doesn't complain.
But when I check nginx's error.log I see a lot…
user299709
- 211
- 2
- 5
2
votes
1 answer
How to load static files in an Nginx + Flask setup if the app is mapped to a sub-directory
I have a basic html site running at a domain (say example.com) and I want to run a flask app in a sub-directory (eg:example.com/test)
flask app is running on port 5433 using the default flask development server.
I used the following nginx…
Hrishi
- 123
- 1
- 6