server {
listen 80; # 监听的端口号
server_name 129.204.189.149; # 服务器的ip或者域名
#charset koi8-r;
#access_log logs/host.access.log main;
# 前端服务反向代理配置
location / {
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
root /root/baker/vue-recruit/dist; # dist目录在服务器的完整路径
index index.html index.htm;
}
# 后端服务反向代理配置
location /api {
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://129.204.189.149:5000/; # 后端服务所部署的服务器地址以及端口号
}
}
VUE 项目 nginx部署
Steven_yang_12023-09-07 17:22
相关推荐
锡兰_CC3 小时前
无缝触达,卓越体验:开启openEuler世界的任意门wuxuanok3 小时前
ThinkPHP ——安装部署与配置程序员果子7 小时前
零拷贝:程序性能加速的终极奥秘天生励志1237 小时前
Nginx安装部署IT利刃出鞘9 小时前
Nginx--变量的使用G_Cloudpipe11 小时前
Nginx 服务器部署全栈工程师修炼指南11 小时前
Nginx | 负载均衡策略:ip_hash / hash 会话保持实践全栈工程师修炼指南1 天前
Nginx | 负载均衡策略:一致性哈希算法实践街灯L1 天前
【Ubuntu】安装配置nginx文件版黛琳ghz1 天前
极速云原生:openEuler之Redis与Nginx部署性能实战