From 46a98170a8ca21c684cd532580ab960dbe478fe5 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Mon, 16 May 2016 01:02:34 -0700 Subject: [PATCH] Clean up nginx reverse proxy answer --- Frequently-Asked-Questions-(FAQ).md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Frequently-Asked-Questions-(FAQ).md b/Frequently-Asked-Questions-(FAQ).md index ed0b18d..c3a8a99 100644 --- a/Frequently-Asked-Questions-(FAQ).md +++ b/Frequently-Asked-Questions-(FAQ).md @@ -98,22 +98,22 @@ http://localhost:8181/delete_duplicate_libraries **A:** You need to forward an external port on your router to the internal port used by PlexPy (default is `8181`). Visit [Port Forward](http://portforward.com/) for instructions for your particular router. #### Q: Why does PlexPy not work with my reverse proxy setup? -**A:** PlexPy uses CherryPy as it's web server, 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 web server (e.g. nginx or apache) is sending the standard `X-` headers to CherryPy. For nginx, the configuration would look like this: +**A:** PlexPy uses CherryPy as it's web server, and CherryPy includes support for reverse proxies. However, you may need to locate your plexpy `config.ini` file and set `http_proxy = 1`. You should also ensure that your proxy web server (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; +proxy_set_header Host $host; +proxy_set_header X-Real-IP $remote_addr; +proxy_set_header X-Forwarded-Host $server_name; +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; ``` -If you are having issues with an HTTPS-terminating proxy setup (e.g. `Internet--->https://Nginx--->http://plexpy`), you should ensure that your proxy web server is also including these two SSL-specific `X-` headers +If you are having issues with an HTTPS-terminating proxy setup (e.g. `Internet--->https://nginx--->http://plexpy`), you should ensure that your proxy web server 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; +# SSL proxying headers +proxy_set_header X-Forwarded-Proto $scheme; +proxy_set_header X-Forwarded-Ssl on; ``` Don't forget to clear your web browser's cache *every* time you update your web server configuration.