http:
1.把项目跑起来
2.安装nginx
3.打开nginx.conf
server {
listen 8085;#改成自己想要通过http访问的端口号,通常用80
server_name localhost;
#charset koi8-r;
charset utf-8;
#access_log logs/host.access.log main;
location / {
proxy_pass http://127.0.0.1:9000;#项目访问路径
root html;
index index.html; #index.html index.htm;
}
4.启动nginx
就可以用自己想要的端口号访问项目了,我这里用的8085访问的
nginx.exe -s stop //停止nginx
nginx.exe -s reload //重新加载nginx
nginx.exe -s quit //退出nginx