1.在nginx.conf改配置
root :static的绝对路径
location:是后台的第一个路径文件
location ~ /ActivityWeb/{ #rewrite /ActivityWeb//(.+) /$1 break; proxy_pass http://real_server; }
url: '/ActivityWeb/activityMessage/addMessage',
server 后台的ip和端口号
2.点击nginx启动就可以了
- http://127.0.0.1:3002 nginx的端口号