From fe92d66c7a6ca10573649708a4de7d5506d3c69b Mon Sep 17 00:00:00 2001 From: Akuukis Date: Thu, 19 Apr 2018 23:00:35 +0300 Subject: [PATCH] Credits to @dssink from #8312 --- NGINX-Reverse-Proxy-for-Web-UI.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/NGINX-Reverse-Proxy-for-Web-UI.md b/NGINX-Reverse-Proxy-for-Web-UI.md index 973633f..92e2d9d 100644 --- a/NGINX-Reverse-Proxy-for-Web-UI.md +++ b/NGINX-Reverse-Proxy-for-Web-UI.md @@ -1,14 +1,16 @@ -If you're using NGINX as a reverse proxy for Web UI, as of version 3.3.15, assuming your reverse proxy is local, your `location /` should have the following settings: +If you're using NGINX as a reverse proxy for Web UI, as of version 4.0.3, assuming your reverse proxy is local, your `location /qbt/` should have the following settings: ```nginx -location / { - proxy_set_header X-Forwarded-Host $host:$server_port; - proxy_hide_header Referer; - proxy_hide_header Origin; - proxy_set_header Referer ''; - proxy_set_header Origin ''; +location /qbt/ { + proxy_pass http://127.0.0.1:8080/; + proxy_set_header X-Forwarded-Host $server_name:$server_port; + proxy_hide_header Referer; + proxy_hide_header Origin; + proxy_set_header Referer ''; + proxy_set_header Origin ''; + add_header X-Frame-Options "SAMEORIGIN"; # see note } ``` -For some users, several windows in the Web UI will still be blank, such as when adding a new torrent from a URL/magnet or local file. If so, try adding the following line to the location block: +Note: For some users, several windows in the Web UI will still be blank, such as when adding a new torrent from a URL/magnet or local file. If so, try adding the following line to the location block: `add_header X-Frame-Options "SAMEORIGIN";` \ No newline at end of file