The pits that the djnago+vue project has stepped on with the configuration of nginx and uwsgi will be operated and maintained without asking for help

Projects written with django+vue at work are deployed with nginx+uwsgi:

The first is to download nginx and uwsgi

Here is the nginx configuration:

server {

         listen       8080;

        server_name localhost;

location /{

          include uwsgi_params;

          uwsgi_pass 127.0.0.1:8001;

        } 

error_page 500 502 503 504 /50x.html;

location = /50x.html {

        root html;

}

}

 

 

 Configuration of my uwsgi.ini file: file path is at the top level of the project

[uwsgi]
socket =127.0.0.1:8001 
chdir = ***** ##This is the absolute path of the project is the absolute path of the django project look with pwd
module =****   #This is the project name.wsgi
master = true
processes=32
threads=2
max-requests=2000
chmod-socket=664
vacuum=true
daemonize = ..... # This log is located at the top level of the project

The url in my vue uses the full path url:

     Server ip + nginx port number + route

 

First start uwsgi:

   The command is: uwsgi uwsgi.ini

Then start nginx again:

  Mine is in conf.d: ../../sbin/nginx -t

                       ../../sbin/nginx -s reload

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325124721&siteId=291194637