1前端地址
cd /opt/code/sell_fe_buyer/config
vim index.js
编辑之后
npm run build
cp -r dist/* /opt/data/wwwroot/sell/
查看是否修改成功的时间
stat /opt/data/wwwroot/sell/
当nginx转发不了的时候会出现无法找到主机
vim /usr/local/nginx/conf/nginx.conf
修改转发至本机地址
location /sell/ {
proxy_pass http://192.168.41.1:8080/;
}
重启:
nginx -s reload
测试虚拟机与本机通不通除了ping方法还有
curl http://192.168.41.1:8080/sell/buyer/product/list
Linux下同步网络时间
一、安装ntp
# yum install -y ntpdate
二、同步时间
# 方式一、使用域名连接,要经过DNS解析,速度慢。
# ntpdate pool.ntp.org
# 方式二、使用IP连接,超级快。
# ntpdate 120.24.81.91