Questions tagged [flask]

144 questions
0
votes
1 answer

root location of Flask app returns 403 on nginx server

I've seen other posts say that either file permissions or the lack of an index directive are the cause. However, my Flask application does not have an index file at all, and most of the site works like a charm. nginx.conf server { listen …
Chockomonkey
  • 2,683
  • 3
  • 11
  • 10
0
votes
1 answer

Nginx + Gunicorn not handling 1000 concurrent users?

I'm running a site with 2 cores on the machine, and nginx(2 processes) and gunicorn(5 workers) serving a flask app. I did a stress test using locust.io to similulate 500 users, and the site breaks while scaling past 450 users. I feel like that is a…
user1835351
  • 101
  • 1
0
votes
1 answer

Upstart script doesn't work on boot - only manually

I followed this tutorial on setting up Flask with nginx + uwsgi. I created an upstart script at /etc/init/flask-uwsgi.conf: start on [2345] stop on [06] pre-start script mkdir -p /var/run/flask-uwsgi chown www-data:www-data…
okoboko
  • 101
  • 1
0
votes
1 answer

Installing scipy in virtualenv on Elastic Beanstalk

I'm using Amazon's Elastic Beanstalk to deploy an example Flask app. I can get a simple "Hello World" app deployed perfectly, but now I'm trying to deploy the app with scipy as a requirement. I've included the necessary packages in my…
0
votes
1 answer

502 bad gateway nginx. uwsgi, flask

Ok so I developed a web app in python and it worked with the internal server: if __name__ == '__main__': app.app.run(debug = True) with no issue at all. I am now trying to start up a nginx server with uwsgi running on arch linux, here are the…
Never Nor
  • 101
  • 1
  • 4
0
votes
1 answer

How to point Ubuntu 14.10 Apache2 (mod-wsgi) server to a specific virtual environment (Python 3.4 / Flask)?

I am running apache2 (mod-wsgi) on Ubuntu 14.10. I am getting 500 Internal Server Error when serving my web-site. I am also using Flask and Python 3.4, and virtual environment. It appears that Ubuntu has python 2.7 as default, and I need to…
0
votes
0 answers

Serving static files through apache

I am new to the whole mod_wsgi and serving files through apache. I am really comfortable with flask but this is something i can't get my head around. I did the hello-world program and successfully displayed hello world! Now i wanted to display a…
Aarushi
  • 121
  • 4
0
votes
1 answer

Database connection to postgresql refused for flask app under mod_wsgi when started by systemd

I'm having a weird problem where a flask application I am trying to run (https://github.com/pyfarm/pyfarm-master) under mod_wsgi under Apache under CentOS 7 cannot connect to a local postgresql server – but only if said apache has been started from…
guidow
  • 3
  • 2
0
votes
1 answer

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) with Nginx Ingress Controller. The setup My Flask…
gigio
  • 3
  • 1
0
votes
0 answers

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, in the "environment overview" section the health status is…
0
votes
1 answer

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 app:app But I get the following error: [2023-08-05…
0
votes
0 answers

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 access the homepage, I check if…
0
votes
0 answers

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 port. assume my hostname is "myuni.edu" which is…
0
votes
0 answers

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 will be the syntax for creating the same entry on…
0
votes
0 answers

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 value: xx.xx.xx.xx - name:…