Skip to content

Instantly share code, notes, and snippets.

@jgillman
Last active March 31, 2018 11:38
Show Gist options
  • Save jgillman/2b8e644878a3141873a8 to your computer and use it in GitHub Desktop.
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 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
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/*;
}
@NexusSix
Copy link

NexusSix commented Jan 9, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment