标签:项目 conf UI 重启 charset set remote lis build
配置文件所在目录: /usr/local/nginx/conf/vhost/XXX.conf
server {
listen 9191;
server_name localhost; (或IP)
charset utf-8;
error_log /home/wwwlogs/cloud_dailybuild.test.frontend.error.log;
access_log /home/wwwlogs/cloud_dailybuild.test.frontend.access.log;
root "/home/production/cloud_dailybuild/cloud-frontend/dist"; #前端项目路径
gzip_static on;
location /api {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://116.62.33.242:9090; #后端项目路径
}
location / {
try_files $uri $uri/ /index.html;
}
}
配置完vhost,重启nginx服务,命令:nginx -s reload
标签:项目 conf UI 重启 charset set remote lis build
原文地址:http://www.cnblogs.com/zhenghefeng/p/6855929.html