-2

I am new to NGINX and uwsgi and Im deploying my first python web application. Having tried numerous times, I get an internal server error. There may be something wrong with my configurations but i can't see what!

I have posted the contents of my configurations: /etc/uwsgi/apps-available/uwsgi.ini:

[uwsgi]
chdir = /srv/www/searcular/venv/
uid = www-data
gid = www-data
chmod-socket = 666
pp=/srv/www/searcular/venv/
socket = /tmp/uwsgi.sock
module = manage
callable = FlaskApp

/etc/nginx/sites-available/searcular: (i have *'d the domain)

server {
    listen          80;
    server_name     *******.com;
    access_log /srv/www/searcular/logs/access.log;
    error_log /srv/www/searcular/logs/error.log;

    location / {
        #uwsgi_pass      127.0.0.1:9001;
        uwsgi_pass      unix:///tmp/uwsgi.sock;
        include         uwsgi_params;
        uwsgi_param     UWSGI_SCHEME $scheme;
        uwsgi_param     SERVER_SOFTWARE    nginx/$nginx_version;

    }

    location /static {
        root   /srv/www/searcular/venv/FlaskApp/static/;
        index  index.html index.htm;

    }

}

Having tried everything, I can not get the application to run.

My application structure is: venv - FlaskApp (main app) - bin - local - lib - manage.py (application to run)

Question: 1. where have my configurations gone wrong?

Jlearner
  • 19
  • 2

1 Answers1

-1

I ended up using the apache2 server and following the instructions on this link: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps

It now works

Jlearner
  • 19
  • 2