- 配置nginx.conf文件:
server { #端口 listen 8097; server_name "Api"; #配置跨域 add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Methods GET,POST,OPTIONS; add_header Access-Control-Allow-Headers Content-Type,Authorization; location / { proxy_pass http://localhost:8059; } }
- 启动nginx(start nginx.exe)
访问nginx发布得端口8097
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)