This is my goal:
example.com -- a simple static website
example.com/nextcloud -- proxies to my nextcloud server
example.com/jellyfin -- proxies to my jellyfin server.
I've tried following many tutorials and reading the documentation, but I can't seem to figure it out. Currently, I have Nginx running on a raspberry pi 4 and my services running on a separate computer. Nginx does serve a simple website, but it doesn't proxy. How can I get it to proxy like the example above?
This is the code I made. I'm sure I did something wrong, but here it is anyway. I can proxy ports just fine, but trying to proxy a subdirectory doesn't work. I don't know how to indent on Reddit, so the code is hard to read.
http{
server {
listen 80;
# serves the simple website
location / {
root /data/www
}
# my attempt at proxying a subdirectory
location /jellyfin/ {
proxy_pass http: 192.168.x.x:8096;
}
}
}
events{}
Any help would be appreciated. I am very much a noob when it comes to self-hosting.