Let's look at the above as an example.
location ^~ /plexpy/
Tells the webserver that this will be located at the server.com/plexpy address
proxy_pass http://192.168.1.28:8181;
include /config/nginx/proxy.conf;
Tells nginx where to find the plexpy app and to use the proxy settings in the proxy.conf file
proxy_bind $server_addr;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Ssl on;
Tells plexpy to use some extra settings necessary to get this working. Don't worry about these, app specific settings can often be found with a bit of googling though.
auth_basic "Restricted";
auth_basic_user_file /config/.htpasswd;
Now to add password protection, you need to add the above lines to that config but you also need to create a .htpasswd file. There are instructions here in the readme or if you prefer you can use an online tool like this one.
Copying the last line of chbmb:osQXeEdll4XFk to a file called .htpasswd and placing it in the /config folder (/mnt/user/appdata/nginx or something similar) Note whatever text editor you use (NOT NOTEPAD ON WINDOWS) must use linux line endings. If you want to use multiple users then just add a new line for each user. So the linuxserver .htpasswd may end up looking like this.
username:hashedpassword Obviously this example below doesn't have real hashed passwords in...
aptalca:weneedatokenyank
asshopo:notanotheryankwhokeepswaving
chbmb:theonlysaneone
danioj:britabroaddownunder
ironicbadger:gladbadgerbaitingisillegal
j0nnymoe:toocoolforschool
kode:phpninjamaster
saarg:tokenswedishguy
smdion:wethinkhesstillalivebutnotreallysure
sparklyballs:grumpyoldman
stark:anyexcusetowearleather
squid:yumyumcouldbedinner
xe:themannoonereallyknowsexists
stark:anyexcusetowearleather
So final "block" looks like this:
location ^~ /plexpy/ {
proxy_pass http://192.168.1.28:8181;
include /config/nginx/proxy.conf;
proxy_bind $server_addr;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Ssl on;
auth_basic "Restricted";
auth_basic_user_file /config/.htpasswd;
}
No, you'd place .htpasswd in the /config folder. As shown in the example above.
Yes it is, has more functionality, so is more complicated, essentially it's a pretty much fully blown webserver, rather than a single app that runs on a webserver.
That's achievable and what this docker is designed for. Once you've done one or two apps, it kind of click. However you've got the above bit a little wrong. The whole point of this is so you DON'T open a ton of ports on your router. Just 80 & 443 both forwarded to your Unraid box. Then all communication with any app is proxied through the nginx container. The config out of the box will automatically forward all port 80 requests to 443, so all communication actually takes place over https and is encrypted. Now go and close those ports again!
It's difficult to point at one single resource. We're working on something to try and make this a bit easier but, don't worry, we'll get you going. Just bear with it.