nginx资料汇总

nginx docker 中的一些目录和 windows下是不同的, 

静态内容目录: /usr/share/nginx/html

配置文件目录: /etc/nginx

日志输出目录: /var/log/nginx/log

更多nginx docker 的信息, 见 https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-docker/

下面是 nginx.conf 设置反向代理的示例: 

location / {
proxy_pass http://app:8080;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

找到 4 篇不错的文章, 

文章1: 有简明的nginx工具命令介绍, 以及 api 反向代理的简单设置. 

文章2:  介绍几个前端 ajax 跨域请求的解决方法, 当然nginx反向代理是最简单有效的方法. 

文章3: 介绍 nginx 为什么如此高效, 主要是因为采用了 epoll 事件驱动的多路复用技术. 

文章4: 是一个系列的教程, 反向代理/负载均衡/支持https等等. 

Nginx 反向代理 API 与 Nginx 教程

https://blog.youkuaiyun.com/qq_39759115/article/details/83615844 

nginx反向代理-解决前端跨域问题

https://www.cnblogs.com/renjing/p/6394725.html

【大型网站技术实践】初级篇:借助Nginx搭建反向代理服务器

https://www.cnblogs.com/edisonchou/p/4126742.html

nginx 入门到进阶的教程

https://www.kancloud.cn/hfpp2012/nginx-tutorial/467009

https://github.com/yinsigan/nginx-tutorial

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值