Questions tagged [flask]

144 questions
1
vote
3 answers

Uwsgi and flask with unix socket instead of URL

I was trying to find out the difference between a socket as a unix file and a socket that is a ip and port. If I switch something like uwsgi to use a file instead of a port and ip, how do I then access uwsgi as a URL in my browser, since no port is…
J.Zil
  • 1,123
  • 3
  • 21
  • 29
1
vote
1 answer

Supervisord, Flask, Tornado (exit status 1; not expected)

Having some issues getting supervisor to run my tornado apps. I have a REST API built with Flask, using Tornado to try and serve it. Problem I am having is that when I try to run with supervisor it appears to be failing on import of other…
Michael
  • 61
  • 1
  • 8
1
vote
0 answers

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 and the xml file is not closed correctly and i…
Zak
  • 11
  • 2
1
vote
0 answers

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, but when im using 10.0.0.1 as hostname flask…
1
vote
0 answers

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.html') @app.route('/handle_data',…
Rahul
  • 13
  • 1
  • 5
1
vote
2 answers

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 gunicorn sudo rm…
acodeaday
  • 11
  • 1
  • 2
  • 4
1
vote
1 answer

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 WSGIDaemonProcess yyy python-path=/var/www/yyy WSGIScriptAlias…
1
vote
1 answer

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 24 14:55:03.464311 2021] [wsgi:error] [pid 5655]…
1
vote
2 answers

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 certificate on the exact same machine, reports no problems? The…
Cerin
  • 3,600
  • 19
  • 61
  • 79
1
vote
0 answers

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 Even the logs dont show any error: Apache…
1
vote
1 answer

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 process running and I can see the window for…
Dullmann
  • 11
  • 2
1
vote
0 answers

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 Request Blocked: The Same Origin Policy disallows…
Ray A.
  • 111
  • 3
1
vote
1 answer

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 workers: 2; number of workers connections: 1024; number…
Amaimersion
  • 111
  • 8
1
vote
1 answer

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: (environment) [crimKidA@CentOS7 ~]$ pip install…
KidACrimson
  • 330
  • 1
  • 10
  • 26
1
vote
0 answers

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 be a little gentle. Here are the details: CentOS…