1

I'm having some issues deploying a Flask app I made so i decided to go back to the basics regarding uwsgi.

I made this simple application using some tutorial and i'm getting a 404 in my Nginx webserver:

from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello World!"

if __name__ == "__main__":
    app.run(host='127.0.0.1', port=5000)

command i run:

uwsgi --ini uwsgi.ini -w hello:app

ini file:

    [uwsgi]
    base = /var/www/KRAKEN/public/cm
    master = true
    processes = 1
    socket = socket.sock
    chmod-socket = 666
    plugin = python

nginx config:

server {
        listen 80;
        server_name someserver;
        root /var/www/KRAKEN/public/;
        location / {
           index index.php index.html index.htm;
        }

    location /cm/ {
        include uwsgi_params;
        uwsgi_pass unix:///var/www/KRAKEN/public/cm/socket.sock;
    }

}

Tips? Thanks!

Edit: added its running on a nginx server. Edit2: nginx config file.

davidism
  • 121,510
  • 29
  • 395
  • 339
Gabriel
  • 5,453
  • 14
  • 63
  • 92

0 Answers0