Questions tagged [flask]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
1answer
22 views

Flask on cheroot/gunicorn scalability

I have developed a HTTP API endpoint using flask which accepts json data on POST requests and sends back json response. I have tried using multiple WSGI servers: gunicorn, cheroot, Bjoern behind Nginx ...
-2
votes
0answers
10 views

I need to turn off proxy_buffering on nginx for my python on the app engine [closed]

I need help turning off proxy_buffering on nginx for my python on the app engine Regards, Graham
-2
votes
1answer
33 views

Web Server Link Domain [closed]

I have a web server and I want to link it to a domain. Will making an A Record pointing to the ip of the server link the domain? Also what is the "main port" for requests. By main port I ...
-1
votes
1answer
773 views

Nginx + Gunicorn + Flask not serving static files

I am new to Nginx and Gunicorn.... I am trying to serve flask app on certain prefix.... ex: https://myweb.com/flask/prefix/ everything works fine except it is not loading static files...... my nginx ...
1
vote
0answers
14 views

Unsuccessful flask app deployment on Amazon EC2 instance

I am trying to deploy a flask app on an Amazon EC2 instance. I have configured everything just fine but the website does not load. It remains stuck on the loading icon as follows: Website not loading ...
0
votes
0answers
119 views

Nginx + uWSGI + Flask Connection Reset

Problem I have a Flask app deployed using Elastic Beanstalk's "Single Container Docker" platform (latest revision 3.2.5 at the time of writing), with an "Application Load Balancer" ...
0
votes
1answer
14 views

Serving multiple socket using gunicorn and Nginx cause a NotFound error

I am trying to serve two Flask apps using Nginx as a reverse proxy. In my default.conf which I have reloaded using sudo service nginx restart I have got: location /app2loc/ { include ...
2
votes
0answers
760 views

Timeout when reading response headers from daemon process. Python, Flask, Apache

I have a problem with my mod_wsgi configuration. Sometimes, I think when there is a lot of traffic on my website, the page breaks and says "Resource temporarily unavailable..." Apache logs: ...
0
votes
1answer
48 views

502 error from nginx. It doesn't seem to be listening to any port, but will connect to default

Facts: Nginx default can be accessed. Gunicorn is running, the website can be accessed via LAN. Nginx runs, does not give me any errors. When I check sudo lsof -i -P -n | grep LISTEN , it tells me ...
0
votes
0answers
18 views

Apache 2.4: Using the same basic auth setup for multiple directories and locations

I have a Flask site setup on my Linux host running Apache 2.4. I use a <Directory> block to set baseline permissions for the filesystem, and a <Location> block to set custom privileges ...
0
votes
0answers
26 views

Nginx Gunicorn not serving requests to external ip

I have develop a python flask project which is run on linux server. I'm trying to develop it on my linux server. After much effort on this. I have configured nginx, gunicorn and my application. My ...
0
votes
0answers
127 views

How to serve a Flask app, static files and other services on the same port using NGINX?

I am trying to serve my Flask app using Nginx. I am able to serve the app using the following server block in my conf.d/test.conf. However when I try to use the application that I have at the ...
0
votes
0answers
66 views

uWSGI cannot find “application” using Flask and Virtualenv

This is the error im getting using uwsgi on my webserver *** Operational MODE: single process *** ModuleNotFoundError: No module named 'app' unable to load app 0 (mountpoint='') (callable not found or ...
0
votes
1answer
346 views

pymongo + flask + gunicorn: “Authentication failed” before first operation when “connect=False”

I'm using MongoDB Atlas. I'm have this URL for connecting: mongodb+srv://<LOGIN>:<PASSWORD>@<URL>/<DB>?retryWrites=true&w=majority&authSource=admin. I'm using this ...
0
votes
0answers
76 views

Configure Apache to associate subdirectory/subdomain to Flask port

I am running Flask on a server that has Apache installed. Users are accustomed to accessing websites on the server using subdirectories such as www.domain.com/mysite. My question is, can I make Apache ...
0
votes
0answers
170 views

High cpu consuming process on postgres in a container

I have a flask app and a PostgreSQL DB in a docker container on my ubuntu server. I found a high CPU consuming process, which increases CPU usage to 100%! I tried finding the process origin by ...
0
votes
0answers
102 views

nginx endpoint streaming audio via ffmpeg fails with “An unexpected TLS packet was received”

Xposting my question from stackoverflow over here in hopes of reaching a wider audience: https://stackoverflow.com/questions/65163329/why-does-my-nginx-endpoint-streaming-audio-via-ffmpeg-fail-with-an-...
0
votes
0answers
59 views

“Docker-compose run” shows backend running but can't access from host

I was trying to use docker for my flask backend along with postgres database. Here is my docker-compose.yml file version: "2" services: api: ports: - 5000:5000 build: ...
0
votes
1answer
267 views

Gunicorn (with Flask) parameters for Google Cloud Run - production setup?

This question was taken down on SO with a suggestion to ask here, so here goes: Looking for some guidance from people with experience in this area. I run a Docker container (approx. 670mb in size) in ...
0
votes
0answers
40 views

Flask apache logs

I created an app with flask and for the deployment and I used an apache webserver on a CentOS8. When I configure the app.conf file in my /etc/httpd/conf.d/ to work on port 80, the prints of my app are ...
0
votes
0answers
37 views

Apache+Flask giving 404

I am trying to setup a Flask app on a LAMP server. My configuration is the following: /etc/apache2/sites-available/myapp.conf <VirtualHost *:80> ServerName myapp ServerAlias myapp ...
0
votes
0answers
288 views

Error 403 on deploying flask website with nginx

I have a flask website running fine in a flask development server at http://0.0.0.0:8080. I need to deploy it to my university server. I have the public IP of the server, and I mapped it to my domain ...
0
votes
0answers
14 views

Weird Responses from Wsgi on Ubuntu 18.04

I have an Ubuntu 18.04 VPS hosted in a data center in Texas. I install ISPConfig3 using the perfect server Howtos. I've run my own ubuntu servers using ISPConfig for some time now. On this latest ...
0
votes
1answer
345 views

Unable to connect flask app by public ip and domain using ubuntu, nginx, uwsgi

I am a beginner in web developement, trying to deploy my flask app in oracle cloud with ubuntu 18.04, nginx, uwsgi and flask. nginx config is default. myapp.config for server is: server { listen ...
0
votes
1answer
229 views

flask app served by nginx uwsgi returns 502

I cannot connect to a flask app (searx search engine) served by nginx and uwsgi. My web server shows "502 Bad Gateway nginx" Here is my nginx error: error log: /var/log/nginx/error.log [crit]...
0
votes
0answers
43 views

NGINX deny all except websockets for Flask app

I have an Ubuntu server running Flask app under nginx, this is my conf: upstream flaskapp { server 127.0.0.1:5000 fail_timeout=0; } server { listen 80; server_name _; location / { ...
0
votes
0answers
64 views

Nginx Reverse-Proxy in Front of Corporate Proxy

I have a FlaskApp with Gunicorn and a Nginx as reverse proxy. The problem is another corporate reverse proxy, which is in front of "my" Nginx reverse Proxy. I do not have access to it. The ...
0
votes
0answers
237 views

In Gunicorn, what are the repercussions of increasing worker timeout?

I have a Flask site running with nginx and Gunicorn. In searching for a solution to a timeout problem I've been having, I found this answer which suggests increasing the Gunicorn worker timeout. This ...
0
votes
0answers
693 views

Apache2 error AH00094 for mod_wsgi python application

Locally when I run my application as a "flask" application, it works just fine. On server I want to make it as an Apache + Mod WSGI application. I've installed Apache2 and python on ubuntu ...
0
votes
0answers
10 views

How to fix *6 connect() failed (111: Connection refused) while connecting to upstream, client: [duplicate]

I am new to NGINX. I am running a Flask app on NGINX on Ubuntu 18.04 on a Digital Ocean VPS. When I try to visit my site, it doesn't load. I checked the logs at /var/log/nginx/error.log. They ...
0
votes
0answers
114 views

Apache + Flask + WSGI - Static Files from JS?

Having a lot of trouble getting this filepath to load in my js code. Relevant snippets: etc/apache2/sites-enabled/canact-le-ssl.conf: # Give an alias to to start your website url with ...
1
vote
1answer
1k views

Powershell: start and stop flask server

I wrote a powershell script to start my flask server, run my tests then stop my server. It starts the server and runs my tests. However, when it kills the $server process, it leaves the actual server ...
0
votes
0answers
263 views

/myproject.sock failed (111: Connection refused) while connecting to upstream,

Iam serving flask by nginx and uwsgi but i am getting a permission error Iam newbie with nginx /var/log/nginx/error.log *1 connect() to unix:///usr/share/nginx/html/myproject/myproject.sock ...
0
votes
1answer
175 views

Apache2 only serving “Index of /”

I am setting up an Apache2 server on Ubuntu to host a Flask website. The issue that I am having is that Apache is only serving my files on an "Index of /" page, rather than serving my site. I am new ...
1
vote
0answers
354 views

CORS error despite CORS being enabled in app server and Nginx

I have a web application and server which is fully functional in a debugging environment, however when it's hosted for production, I get the following error in the browser console: Cross-Origin ...
0
votes
0answers
628 views

LDAPStartTLSError: ('wrap socket error: [SSL] internal error (_ssl.c:1108)',)

Hy I'm starting learning flask but when I follow this documentation I receive this error... Strange that using ldapsearch everything is fine.... Using: Ubuntu Focal python3.8 python3-flask ...
1
vote
0answers
1k views

flask, gunicorn (gevent), sqlalchemy (postgresql): too many connections

I created Flask WSGI-application which uses gunicorn as WSGI-server, for DB it uses PostgreSQL through Flask SQLAlchemy extension. That's all hosted on Heroku. gunicorn configuration number of ...
0
votes
1answer
386 views

Cannot `pip install flask` in Python3.6 virtual environment

I'm trying to follow a MS DevOps tutorial here: https://microsoft.github.io/PartsUnlimitedMRP/pandp/200.1x-PandP-LocustTest.html I've tried Ubuntu and CentOS, both produce the exact same failure: (...
2
votes
0answers
3k views

Cannot connect to Flask server via public IP, only private IP

I have a simple Flask server that echos requests it gets to the terminal. Requests I send it via the device's public IP address do not register. The flask server is started correctly on all ...
0
votes
0answers
255 views

Nginx uniq session and clear cookie

Im using nginx to redirect my API code and apache guacamole. i have an issue that i need to use multiuser connection but if im logged in to Auser and i try to connect to Buser ( same browser) it try ...
0
votes
1answer
559 views

Receive 404 Not Found for a Flask app when I use Nginx as reverse proxy with Gunicorn socket

I have been following the tutorial here to deploy my own flask app to my Ubuntu 16 server. I used Nginx as a reverse proxy to pass requests to a gunicorn socket. Just in case anyone wants to know ufw ...
1
vote
0answers
382 views

Subdomain setup for Flask + apache

I have installed and deployed Flask on a CentOS server but the subdomain for some reason, is not working properly. I really need some help on this one. I am actually a newbie in this field so please ...
1
vote
0answers
261 views

Should I avoid CORS when building an SPA with backend API hosted on the same server?

I've stumbled upon this question and had the thought that my application should not require CORS, since it is hosted on the same server (a raspberry pi). However, since CORS is a security "feature" I'...
1
vote
0answers
202 views

Flask app to upload an image file via Apache 2 not working

Running Apache/2.4.41 on Fedora 30 and python3-mod_wsgi-4.6.4-3.fc30.x86_64. And doing a test with: mod_wsgi-express start-server /var/www/flask/upload_pictures.wsgi --user myuser works mostly fine ...
0
votes
1answer
2k views

VueJS sending POST to Flask fails (CORS Request blocked)

I've been following this vuejs guide and this flask guide to host my frontend and backend on a raspberry pi. On my frontend I have this method, which sends an axios POST to the backend. // path = ...
0
votes
0answers
207 views

mod_wsgi LoadModule for Python3 is ignored

Trying to configure apache with mod_wsgi and Python3 mod_wsgi config LoadModule wsgi_module /etc/httpd/mod_wsgi/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so Flask App config WSGIScriptAlias /...
1
vote
1answer
600 views

How to protect against session hijacking in Flask [closed]

So, i'm developing a Flask web-app and i wanted to test its security since i've implemented the following: SSL Cert with cookies being securely transmitted CSRF token to avoid CSRF attacks Cookie ...
0
votes
1answer
810 views

Localhost reverse proxy fails nginx AWS Ubuntu

I am attempting to to host a Flask app with Gunicoron on a server that hosts multiple web services on Nginx. I am using AWS ubuntu as a test bed for evetually hosting it on said Nginx mutilple web ...
2
votes
1answer
2k views

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 ...
1
vote
1answer
3k views

Import Error on deploying a flask app on apache

I am trying to deploy a flask app on a VPS using WSGI. I am not using a virtualenv, and pandas is installed on the system: Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0] on linux2 ...