No guarantees any of this is secure or the right way to do things, I'm using this 90% for
https://linode.com/docs/web-servers/nginx/use-nginx-reverse-proxy/
For certs/https: https://certbot.eff.org/lets-encrypt/ubuntubionic-nginx
Remember to port forward 443 instead of 80
https://www.linode.com/docs/applications/media-servers/install-plex-media-server-on-ubuntu-18-04/
Css needs to be served from /web
, but I wanted to be able to access plex at just <blah>.<domain>.com/plex
TODO Figure out how to make this work with https. After I enabled https, I had to host under location / {
, and the shortcuts for /plex
no longer worked. I got the error Unable to connect to "<PLEX_SERVER_NAME>" securely.
$ cat /etc/nginx/conf.d/plex.conf
server {
listen 80;
listen [::]:80;
server_name example.com;
location /plex {
proxy_pass http://localhost:32400/web;
proxy_set_header X-Real-IP $remote_addr;
}
location /web {
# serve the CSS code
proxy_pass http://localhost:32400;
}
}
On the server
# contents of /etc/ssh/ssh_config
Host *
ForwardAgent no
ForwardX11 no
ForwardX11Trusted yes
On the client
# contents of ~/.ssh/config
Host <INSERT NAME HERE>
HostName 192.168.<INSERT IP HERE>
ForwardX11 yes
User <INSERT REMOTE USER HERE>
Edit /etc/fstab
and include something like the following
/dev/disk/by-id/usb-Seagate_BUP_BK_NA7PVLK7-0:0-part2 /mnt/sgExternal auto nosuid,nodev,nofail,x-gvfs-show 0 0
Alternate
gnome-disk
and configure there
I found it easiest to use gnome-disk
to do the initial setup, and then tweak fstabs manually to get the right directory
Note
You do not have to create the directory for the mount target (eg, /mnt/sgExternal
) beforehand, the system will create it for you
https://gist.github.com/srilankanchurro/fa3fdeb5cf10ebb251aa88338b8b37db