From cc5c65244d24f10127b3e17396d204b7b8e57169 Mon Sep 17 00:00:00 2001 From: Hamilton Turner Date: Sun, 24 Jan 2016 13:44:12 -0500 Subject: [PATCH] Added first FAQ - how to get reverse proxy support working properly. Removed boilerplate text --- Frequently-Asked-Questions-(FAQ).md | 39 ++++++++++++----------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/Frequently-Asked-Questions-(FAQ).md b/Frequently-Asked-Questions-(FAQ).md index b2b07a1..23356ba 100644 --- a/Frequently-Asked-Questions-(FAQ).md +++ b/Frequently-Asked-Questions-(FAQ).md @@ -1,29 +1,22 @@ -## Category 1 FAQs -* [This is question 1?](#cat1-q1) -* [This is question 2?](#cat1-q2) +## Why does PlexPy not work with my reverse proxy setup? -## Category 2 FAQs -* [This is question 1?](#cat2-q1) -* [This is question 2?](#cat2-q2) +PlexPy uses CherryPy as it's webserver, and CherryPy includes support for reverse proxies. However, you may need to locate your plexpy `config.ini` file and toggle the value `http_proxy` to `1`. You should also ensure that your proxy webserver (e.g. nginx or apache) is sending the standard `X-` headers to CherryPy. For nginx, the configuration would look like this: ---- +``` +# Standard proxying headers +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +proxy_set_header X-Forwarded-Host $server_name; +proxy_set_header Host $host; +proxy_set_header X-Real-IP $remote_addr; +``` -### Category 1 +If you are having issues with an HTTPS-terminating proxy setup (e.g. `Internet--->https://Nginx--->http://plexpy`), you should ensure that your proxy webserver is also including these two SSL-specific `X-` headers + +``` +# Used by Cherry-Py (different versions look for different headers) +proxy_set_header X-Forwarded-Proto $scheme; +proxy_set_header X-Forwarded-Ssl on; +``` -#### Q: This is question 1? -**A:** This is an answer. - -#### Q: This is question 2? -**A:** This is an answer. - ---- - -### Category 2 - -#### Q: This is question 1? -**A:** This is an answer. - -#### Q: This is question 2? -**A:** This is an answer.