Questions tagged [flask]
The flask tag has no usage guidance.
143
questions
-2
votes
0
answers
10
views
What is a requisite stack for a webapp with data upload, backend processing, and user-specific dashboard?
I'm not wondering what the "best" tech stack is, because I know this is subjective and depends heavily on the specific context. However, I am a beginner and don't know what a viable tech ...
0
votes
1
answer
38
views
Dealing with Flask routing paths when deployed behind URL prefix
I have single page application build using the python Flask framework. I'm using gunicorn as the web server and I have containerised it using docker. It is deployed on Azure Kubernetes Services (aks) ...
0
votes
0
answers
23
views
Hosting dynamic Flask website using AWS ElasticBeanstalk
I have been trying to host a dynamic Flask website which includes Machine Learning on AWS ElasticBeanstalk. The success message "Environment has succesfully launched" is displayed.
However, ...
0
votes
1
answer
156
views
Gunicorn can't bind port 80
I (want to) have a Google Cloud server running a Gunicorn server, however it refuses to bind to port 80, despite it being free.
Here's the command I'm using to start it:
gunicorn -w 4 -b 0.0.0.0:80 ...
0
votes
0
answers
107
views
flask session work in a development server, but not in a production server(nginx)
I have created a webapp with an authentication system. I use the session module to check if a user is logged in. During the login phase, I set session['logged_id'] = True, and when a client tries to ...
0
votes
0
answers
244
views
Proxy apache2 to container gives 404 error
I am new to apache2 I've followed every tutorial on the internet, I think I've seen every question but it didnt help. The problem is that
My container contains flask app.
Container listens to 45654 ...
0
votes
0
answers
135
views
How can I write an Nginx rewrite from the IIS URL rewrite?
I have set up React + Flask app on windows IIS it is working fine. Now I want to use Nginx instead of IIS. I have created URL Rewrite in IIS from fronted to backend waitress server API calls.
.
What ...
0
votes
0
answers
128
views
GCloud SQL timed out on a Docker container
I have a flask app in a Paperspace Deployment Docker container. It is connected to a Google Cloud SQL (MySQL).
Here are the variables in the YALM parameters:
env:
- name: CLOUD_SQL_CONNECTION_NAME
...
0
votes
0
answers
58
views
How to make changes to Flask api without interrupting live traffic
I have a backend hosted at api.example.com using Flask. I would like to be able to make changes to this api without interrupting live traffic. I'm thinking of ways to accomplish this but without using ...
0
votes
0
answers
198
views
Use Multiple Azure Application Insights in one Flask app
Hi i have a flask application that Build as a docker image to serve as an api
this image is deployed to multiple environments (DEV/QA/PROD)
i want to use an applicationInsight for each environment
...
1
vote
0
answers
303
views
how to fix apache server :(20014)Internal error : AH01102: error reading status line from remote server 127.0.0.1:5000
I use a flask server in apache.
run a script which prepare then download an xml file.
this is working fine is script
but if script lasts longer than 80 sec it's stopped and http error 502 is displayed ...
0
votes
0
answers
128
views
Apache server has randomly started returning "access denied" error
Like 7 months ago I created a flask API that was being served with Apache, everything was working fine up until last week when it started to returning the following error: "data":[],"...
1
vote
0
answers
409
views
Python flask captive portal
Im making python tool for creating access point with hostapd, run http server on 10.0.0.1, and using dnsmasq redirect clients to the http server login page
Its working when i use localhost as hostname,...
0
votes
1
answer
681
views
I get an Error "Load cannot follow more than 20 redirects" after installing ssl certificate
this is my config file:
server {
server_name songreccs.com;
location /static {
root /home/user/sonreccs/flaskrec/;
}
location / {
...
0
votes
1
answer
2k
views
Python Flask on IIS: HttpPlatform Doesn't Load When Visiting Hostname
So my web.config currently looks like the following for production and the site works when I visit it
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<...
1
vote
0
answers
6k
views
How to show python console output to website using flask
This is the flask file
from flask import Flask, redirect, render_template, request
from subprocess import call
app = Flask(__name__)
@app.route('/')
def mai():
return render_template('homepage....
0
votes
0
answers
3k
views
Nginx giving "No such file or directory" error for static files
I am trying to deploy a site on to a linux server following Corey Schafer's guide for Flask.
My site is working, but nginx is unable to read/access/find the static folder and the files within.
I ...
1
vote
2
answers
26k
views
Unable to restart nginx, I think something to do with port 80?
I am following Corey Schafer's flask tutorial.
I am trying to deploy to a Linux server, but am unable to get nginx working.
These are the commands I have run so far:
sudo apt install nginx
pip install ...
0
votes
1
answer
687
views
Unable to access one server on network, while able to access others
I am not certain about the terminology; I will try to be as clear as possible but note I might use a word wrong.
I have a number of Ubuntu servers, all connected to the same network. I can access each ...
0
votes
1
answer
22
views
Hosting Google VM on web
sorry for the rookie question, I'm just starting with Google Cloud and web developement. I have a Flask application, works perfectly locally, and also when deployed to a VM in GC. However I can only ...
0
votes
0
answers
545
views
How to add multiple ip and add sub-domain in nginx?
I was following the nginx,uwsgi with flask & docker tutorial. My nginx config file contains:
server {
listen 5000;
server_name 19X.X.X.X;
client_header_buffer_size 5M;
...
1
vote
1
answer
722
views
Running multiple flask applications with different domain names using mod_wsgi
We are trying to run 2 different flask applications with different domain names from same server using mod_wsgi + Apache2.
This is the settings configured in httpd.conf
# For www.yyy.com
...
0
votes
0
answers
24
views
Server CPU Usage Above 100% for the Past Week [duplicate]
My server running ubuntu and flask for a webapp as well as scrapy, selenium, and postfix has been experiencing very abnormal cpu usage. This server has not used as much cpu load in the past, but has ...
0
votes
0
answers
774
views
Gateway Timeout Error AWS Lightsail
I have a flask API container deployed on Lightsail. When I make a request to one of the API endpoints, I get a 504 gateway error as the status on the client-side. However, when I check the server logs ...
2
votes
1
answer
825
views
Why is Nginx truncating the JSON streaming response?
Our stack is Client(Browser) <-> Nginx Reverse Proxy <-> Webserver(Flask+Gunicorn) <-> Golang gRPC server
The problem is when the client makes a call to the /realtimedata endpoint, ...
0
votes
1
answer
742
views
Unix socket communication with Apache 2.4.51 and Flask App using Uwsgi returning "404 Not Found"
I'm using Apache in the front as web server and running python flask application at
the back end and they communicate using Unix socket as mentioned in the link below for mod_proxy_uwsgi module and i ...
0
votes
1
answer
2k
views
Redirect URI mismatch error from Google OAuth for flask app
I have a Flask web application which is hosting in Google Cloud Run which is hosted with https://mydomain.run.app.
Now I am trying to add google authentication to it. I have created the API under ...
1
vote
1
answer
404
views
Unable to deploy simple flask app on ubuntu vps
I am trying to deploy a simple flask app on an VPS running Ubuntu 20 and LAMP
The app runs fine when I execute it with flask run from inside the app folder
However the server log has errors:
[Sun Oct ...
2
votes
1
answer
572
views
source venv/bin/activate isn't returning anything on CentOS
I'm trying to deploy a Python Flask app (for API endpoint) on CentOS for work, but every online guide I've followed isn't working for me!
python3 -m venv APIenv
The env was created successfully, but ...
0
votes
1
answer
1k
views
Python Import Error - No module
I'm sorry this is basic. I've followed a fairly simple tutorial and get this error when trying to run flask locally:
Traceback (most recent call last):
File "/Users/james/opt/anaconda3/lib/...
2
votes
2
answers
1k
views
Why is Apache2 not finding my WSGI app?
In my previous question, I asked how to make mod_wsgi use a specific Python version. Following the answer from that question, I created a Python 3.9 virtual environment and made WSGI use it. However, ...
0
votes
0
answers
478
views
How do I configure uwsgi as a production WSGI server?
I have a flask app that I want to run using uwsgi. I am also managing the uwsgi with supervisor.
here is the my supervisor.conf file
[program:myapp]
command=/opt/python_envs/apps/bin/uwsgi --ini /opt/...
1
vote
2
answers
2k
views
Gunicorn/Flask reject identical SSL certificate that works fine with Apache
What would cause a Gunicorn server running a Flask app to report a "sslv3 alert certificate unknown" error in the browser, when an Apache server running a WSGI app, using the exact same ...
0
votes
1
answer
367
views
Cant start wsgi through Nginx
At first:
When i started nginx i see errors in log:
unix:/root/project/flask_paramiko.sock failed (13: Permission denied) while connecting to upstream
uwsgi.ini:
[uwsgi]
#chdir = /root/project
...
0
votes
1
answer
410
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
1
answer
72
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
1
answer
2k
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
0
answers
92
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
...
2
votes
0
answers
1k
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
1
answer
616
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
0
answers
2k
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
1
answer
251
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
0
answers
959
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
0
answers
837
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
0
answers
1k
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
1
answer
1k
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
0
answers
370
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
1
answer
1k
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
0
answers
3k
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
1
answer
1k
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 ...