nginx反向代理禁用缓存
今天遇到一个怪事,nginx+frp反向代理后,很多网站都重定向到了同一个网站,经排查, 是nginx反向代理缓存的过, 于是禁用缓存: #PROXY-START/ location / { expires 12h; if ($request_uri ~* "(php|jsp|cgi|asp|aspx)") { expires 0; } proxy_pass http://127.0.0.1:5000; proxy_set_header Host $host; 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; ...
nginx反向代理wss
先上NGINX配置: worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 443 ssl http2; server_name localhost; ssl_certificate aa.pem; ssl_certificate_key aa.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_protocols TLSv1TLSv1....
nginx反向代理搭建谷歌镜像
nginx反向代理搭建谷歌镜像. 啥也不说了,直接上代码: server { listen 8000; server_name google.uol123.com; location / { #root "d:/wwwroot/test"; #index index.html; #proxy_redirect off; proxy_pass https://www.google.com.hk/; proxy_redirect / https://www.google.com.hk/; proxy_set_header Host www.google.com.hk; proxy_set_header X-Real-IP $remote_add...