Questions tagged [flask]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
67 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....
user avatar
  • 3
0 votes
0 answers
55 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 ...
user avatar
0 votes
2 answers
329 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 ...
user avatar
0 votes
1 answer
48 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 ...
user avatar
0 votes
0 answers
62 views

mod_wsgi daemons not working

I setup mod_wsgi on my ubuntu/apache2 server. I'm trying to run threads but daemons do not work. When I try to run them in the background, nothing happens. My wsgi script: import sys, logging sys.path....
user avatar
  • 101
0 votes
1 answer
20 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 ...
user avatar
0 votes
0 answers
60 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; ...
user avatar
  • 1
0 votes
1 answer
200 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 ...
user avatar
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 ...
user avatar
0 votes
0 answers
222 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 ...
user avatar
0 votes
0 answers
22 views

Do I need to encrypt API call if flask listening on localhost only?

I'm setting up a flask + reactJS combination for the first time. In my app, I will have a user design something then pass it as json to the flask back end that will do some python combinations. I have ...
user avatar
2 votes
1 answer
339 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, ...
user avatar
0 votes
1 answer
190 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 ...
user avatar
  • 1
0 votes
0 answers
30 views

Retrieving different sessions in flask

I'm using Flask-Session to store server-side session data on Redis. This is currently working fine but I want to access data from a previously-created session on a different browser (or computer). ...
user avatar
0 votes
1 answer
427 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 ...
user avatar
1 vote
1 answer
142 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 ...
user avatar
2 votes
1 answer
212 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 ...
user avatar
  • 145
0 votes
1 answer
728 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/...
user avatar
  • 239
0 votes
0 answers
48 views

Apache not listening on Virtualhost port

I am running Cento7 with Apache. I wrote a restAPI with flask and now trying to run it on port 8080. I dont have anything running on 8080 and the server restarts successfully. I have also verified ...
user avatar
2 votes
2 answers
308 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, ...
user avatar
0 votes
0 answers
140 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/...
user avatar
1 vote
2 answers
682 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 ...
user avatar
  • 3,440
0 votes
1 answer
121 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 ...
user avatar
0 votes
1 answer
110 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 ...
user avatar
  • 119
-2 votes
1 answer
44 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 ...
user avatar
-1 votes
1 answer
1k 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 ...
user avatar
1 vote
0 answers
41 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 ...
user avatar
2 votes
0 answers
760 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" ...
user avatar
  • 121
0 votes
1 answer
155 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 ...
user avatar
  • 103
1 vote
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: ...
user avatar
  • 11
0 votes
1 answer
118 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 ...
user avatar
0 votes
0 answers
368 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 ...
user avatar
  • 1
0 votes
0 answers
403 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 ...
user avatar
  • 103
0 votes
0 answers
474 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 ...
user avatar
0 votes
1 answer
865 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 ...
user avatar
0 votes
0 answers
195 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 ...
user avatar
  • 101
0 votes
1 answer
665 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 ...
user avatar
0 votes
0 answers
2k 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 ...
user avatar
  • 101
0 votes
1 answer
727 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 ...
user avatar
  • 101
0 votes
1 answer
2k 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]...
user avatar
  • 205
0 votes
0 answers
124 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 / { ...
user avatar
  • 101
1 vote
1 answer
2k 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 ...
user avatar
0 votes
0 answers
720 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 ...
user avatar
0 votes
1 answer
861 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 ...
user avatar
  • 101
1 vote
0 answers
1k 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 ...
user avatar
  • 111
0 votes
1 answer
1k 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 ...
user avatar
1 vote
1 answer
2k 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 ...
user avatar
1 vote
1 answer
656 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: (...
user avatar
2 votes
0 answers
4k 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 ...
user avatar
  • 21
0 votes
0 answers
681 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 ...
user avatar