Skip to content

Instantly share code, notes, and snippets.

@xrip
Last active July 3, 2023 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xrip/5b8e43372476137b7c4dfaeaebd91ac4 to your computer and use it in GitHub Desktop.
Save xrip/5b8e43372476137b7c4dfaeaebd91ac4 to your computer and use it in GitHub Desktop.
Niginx config for transparent site mirroring (like one site VPN). You need add your nginx IP and host name of mirrored site to local /etc/hosts file.
user www-data;
worker_processes auto;
pid /run/nginx.pid;
load_module modules/ngx_stream_module.so;
events {
worker_connections 768;
use epoll;
multi_accept on;
}
stream {
server {
resolver 1.1.1.1;
ssl_preread on;
listen 443;
proxy_pass $ssl_preread_server_name:443;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment