项目是前后端分离
第一个疑问,我的配置有没有写错?
第二个疑问, 我的 vue axios URL 怎么写?
nginx配置文件 .conf
server {
listen 9000;
server_name 127.0.0.1:9000;
charset utf-8;
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:9001;
uwsgi_pass 127.0.0.1:9002; #这个写这对不对?
}
server {
listen 80;
listen [::]:80;
server_name localhost;
charset utf-8;
default server block.
location / {
root /index_nginx/test_office/dist;
index index.html index.htm;
}
error_page 404 /404.html;
location =/40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
uwsgi配置文件
[uwsgi]
# 这个文件与settings.py 平级
socket=:9000
#项目绝对路径
chdir=/django_server/pro_test
#项目的相对路径
wsgi-file=pro_test/wsgi.py
#进程个数
process=8
#每个进程的线程个数
threads=2
#pid记录文件
pidfile=uwsgi.pid
#服务的日志文件位置
daemonize=uwsgi.log
#开启主进程管理模式
master=True
您的代码,是我的引导,谢谢您的认真!