首页 > 系统相关 >nginx反向代理

nginx反向代理

时间:2023-01-11 18:38:27浏览次数:35  
标签:hapu set header Cache 代理 nginx add 反向 proxy


 nginx反向代理

location /edu
{
proxy_pass https://c3wedu.hapu.net;
proxy_set_header Host c3wedu.hapu.net;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;

add_header X-Cache $upstream_cache_status;

#Set Nginx Cache

add_header Cache-Control no-cache;
expires 12h;
}

 

标签:hapu,set,header,Cache,代理,nginx,add,反向,proxy
From: https://blog.51cto.com/jing/6002527

相关文章

  • Vue使用Proxy代理后仍无法生效的解决
    devServer:{port:8080,proxy:{'/manage':{target:process.env.VUE_APP_API_BASE_URL,ws:false,changeOrigin:true,p......
  • git设置代理
    #设置ssgitconfig--globalhttp.proxy'socks5://127.0.0.1:1080'gitconfig--globalhttps.proxy'socks5://127.0.0.1:1080'#设置代理gitconfig--globalh......
  • Nginx 进阶篇
    目录Nginx进阶篇五、服务配置1、配置成系统服务2、配置环境变量六、部署静态资源1、概述2、配置指令2.1listen2.2server_name2.3location2.4root2.5alias2.6i......
  • thinkphp安装在子目录的nginx配置
    进行URL重写,将默认访问URL中的index.php?s=通过rewrite隐藏location/blog/{indexindex.phpindex.htmlindex.htm;if(!-e$request_filename){rewrite......
  • nginx反向代理,解决vue项目跨域问题
     nginx的配置:  把/api转到另一个域名下#PROXY-START/apilocation/api{expires12h;if($request_uri~*"(php|jsp|cgi|asp|aspx)"){expires0......
  • VUE项目的API项目的nginx配置
    #PROXY-START/apilocation/api{expires12h;if($request_uri~*"(php|jsp|cgi|asp|aspx)"){expi......
  • nginx配置
    #Formoreinformationonconfiguration,see#*OfficialEnglishDocumentation:http://nginx.org/en/docs/#*OfficialRussianDocumentation:http://ngin......
  • nginx 如何处理https 协议访问http 协议图片的问题
    1.先在后端转换成代理路径 2.然后再配置nginx,转换成http路径,实现访问    ......
  • Nginx负载均衡(Centos7)
    需要实现的效果:centos服务器上安装nginx(监听80端口),另外安装两个tomcat,分别监听8080和8081当在浏览器中输入 http://192.168.17.129/edu/a.html 的时候,实现负载均衡,平......
  • tinyproxy简单应用(linux设置网络代理、中转)
    1、安装yuminstalltinyproxy-y 2、修改配置文件修改代理ip和端口vim/etc/tinyproxy/tinyproxy.conf 3、服务管理systemctlstarttinyproxysystemc......