Nginx配置 前后端项目

2024-03-19

Nginx 配置

新增/查看时间配置项功能
1、yum install nginx;
vim /ngxin/conf/ngxin.conf
2、配置sever对外的端口:8099
3、配置代理服务的地址

 location /message  {
             proxy_pass http://47.94.3.133:9000;
         }

4、配置前端项目映射地址

     location / {
        root     /root/app/sms_mgr/dist/;
	    index    index.html index.htm;
	    try_files  $uri $uri/ /index.html;
	    }

	    location ^~ /static/ {
          alias /root/app/sms_mgr/dist/static/;
        }

最后修改完后,重启配置文件

cd /ngxin/sbin/
./ngxin -s reload
posted @ 2024-03-20 13:28  Only_Aptx-4869  阅读(359)  评论(0)    收藏  举报