From 0f89b472d730e2c83cdfa812dae6ef802fd73b18 Mon Sep 17 00:00:00 2001 From: Dmitry Chumak Date: Thu, 8 Dec 2016 00:23:05 +0800 Subject: [PATCH] nginx config --- fb-proxy.conf | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 fb-proxy.conf diff --git a/fb-proxy.conf b/fb-proxy.conf new file mode 100644 index 0000000..7c009e3 --- /dev/null +++ b/fb-proxy.conf @@ -0,0 +1,35 @@ + set $listen_ip 127.0.0.1; + set $base_domain ololosh.com; + server { + server_name cn.fb.ololosh.com; + listen $listen_ip; + location / { + proxy_pass http://cn.flibusta.is; + proxy_set_header Host cn.flibusta.is; + proxy_set_header Referer flibusta.is; + } + } + server { + server_name static.fb.ololosh.com; + listen $listen_ip; + location / { + proxy_pass http://static.flibusta.is:443; + proxy_set_header Host static.flibusta.is; + proxy_set_header Referer flibusta.is; + } + } + server { + server_name fb.ololosh.com; + listen $listen_ip; + + location / { + proxy_pass http://flibusta.is; + proxy_set_header Host flibusta.is; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + + proxy_redirect http://static.flibusta.is:443/ http://static.fb.ololosh.com/; + proxy_redirect http://cn.flibusta.is/ http://cn.fb.ololosh.com/; + } + }