

nginx 根据国家IP代理不同服务。index.html 不缓存
source link: https://yazhen.me/_posts/2021/nginx-cache/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

注意需要有个country-code文件。
德语,日语,英语 版本
- 用分支来管理三个网站
- 用端口来分开运行
- 部署测试环境一套
- 利用nginx map 配置
map $geoip_country_code $upstream {
LR web_lr;
US web_us;
RU web_russia;
default $subnet;
}
index.html
index.html 不需要缓存,静态资源需要缓存。目前使用的方案
location ~* \.(jpg|png|css|js|font|eot|ttf|woff|woff2)$ {
root /usr/local/erp/online-booking/;
}
location / {
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
root /usr/local/erp/online-booking;
index index.html;
try_files $uri $uri/ /index.html;
}
Recommend
-
62
现象 目前针对于跨国业务,所以国内外访问的服务可能是不同的(至少不是同一个页面),但域名想要同一个域名,于是想到要区分开访问区域。 方案 方案一: 阿里云域名解析时,提供了域名解析业...
-
8
设置Python的wheel包自动根据系统安装不同的依赖 2020-03-31 23:30:16 +08 字数:614 标签: Python 当年,...
-
4
【SSH】配置一机多ssh-key共存,根据不同域名自动选择不同ssh-key今天入职了新公司,又到了开始配置一机多ssh-key的时候了,由于之前自己用nodejs写的博客数据的备份文件丢失,导致之前的博文消失,现在重新书写此项配置教程。也许有朋友看过我之前的...
-
5
org-mode根据不同条件tangle不同代码块 原来org-mode中代码块的参数可以是一段elisp代码,这个特性可以让我们动态tangle不同代码块,像这样(代码摘自h...
-
50
vscode 能不能根据项目配置,开启不同的插件,比如一个 vue2 的项目开启 vetur,再打开一个 vue3 的项目开启 volar V2EX › Visual Studio Co...
-
3
如何安装nginx,并根据不同的项目读取不同的配置文件 原创 公号运维家 2022-03-03 09:55:01...
-
5
使用 Nginx 缓存代理使您的后端更可靠 我们大多数人都...
-
9
nginx启用proxy cache 代理缓存 nginx启用proxy cache 代理缓存 nginx.conf中的 http {
-
10
在 SwiftUI 中,根据需求弹出不同的 SheetSheet 是一个我比较喜欢的交互形式,它可以很好的控制用户的操作行为,让用户的交互逻辑单线条化。在 iOS14 上,SwiftUI 增加了 fullCover,支持了全屏的 Sheet 方式,让开发者又了更多的选择。
-
5
Nginx 目录服务和反向代理的 web 鉴权认证 原创 2023-07-26 本文提供两种便捷的 web 鉴权认证方法,适用于安全性要求不高小型系统。包括 HTTP Auth Basic 和 Nginx Cookie 判断。 笔者的主服务使用...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK