Clean up nginx reverse proxy answer
@@ -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.
|
**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.
|
||||||
|
|
||||||
#### <a name="general-q10">Q:</a> Why does PlexPy not work with my reverse proxy setup?
|
#### <a name="general-q10">Q:</a> 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
|
# Standard proxying headers
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-Host $server_name;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header X-Forwarded-Host $server_name;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
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)
|
# SSL proxying headers
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header X-Forwarded-Ssl on;
|
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.
|
Don't forget to clear your web browser's cache *every* time you update your web server configuration.
|
||||||
|
Reference in New Issue
Block a user