server {
listen 80;
server_name 192.168.160.36;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html/dist;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
这个是我配置的nginx,发起请的时候报跨域问题
要代理的地址是192.168.160.7.:8000
如何解决
你的接口没配代理呀,当然会报错
加个接口的代理试试,可以参考下面配置代码