Last active
March 31, 2018 11:38
-
-
Save jgillman/2b8e644878a3141873a8 to your computer and use it in GitHub Desktop.
An example of setting up PlexPy with a reverse proxy in Nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; This is the PlexPy config.ini file. | |
; Just the two lines needed for the reverse proxy, the rest of the file doesn't | |
; need to be touched | |
http_root = /plexpy | |
http_proxy = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http { | |
# ... | |
server { | |
listen 80; | |
server_name example.com; | |
root /usr/local/var/www; | |
index index.html index.htm; | |
# ... (cut out other location blocks) | |
location /plexpy/ { | |
proxy_bind $server_addr; | |
proxy_pass http://127.0.0.1:8181; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $server_name; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
} | |
include servers/*; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was following another guide that omitted the step to change config.ini setting to "http_proxy = 1".
Seems to work fine without changing from http_proxy=0. Can you explain what this setting does?
Also, I my "location /plexpy { ... " is same as above nginx-sample.conf.
I am able to access plexpy via "http://mydomain.com/plexpy" . What should I change for "http://plexpy.mydomain.com" to work?