首页 > 编程知识 正文

服务器ip转发,nginx搭建http服务器

时间:2023-05-06 05:48:46 阅读:41826 作者:1159

http的内部配置

proxy_set_header Host $host;

proxy _ set _ headerx-real-IP $ remote _ addr;

proxy _ set _ headerx-forwarded-for $ proxy _ add _ x _ forwarded _ for;

vue npm项目压缩打包,访问nginx配置

1 .安装

完成后,用./nginx -s reload重新加载nginx即可

#配置./configure-- prefix=/usr/local/nginx-- with-http _ gzip _ static _ module # #标记安装重新安装

2 .部署

gzip on;

gzip_static on;

gzip_comp_level 2;

GIP _ types text/plaintext/htmltext/CSS application/x-JavaScript text/XML application/XML application/xmlrstext

参考:vue封装gzip压缩两种方案_一只前端客户端-CSDN博客

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。