我通过nginx反向代理解决跨域问题,启动项目,地址为localhost:8142, 然后配置nginx的8142端口。
nginx报错
nginx: [emerg] bind() to 0.0.0.0:8142 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)
server {
listen 8142;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location /Webapi {
rewrite ^.+Webapi/?(.*)$ /$1 break;
include uwsgi_params;
proxy_pass http://www.baidu.com;
}
应该怎么解决?
你的应用是8142端口,你用nginx代理就不要用这个端口了啊,换个端口