Hi all.
This post is about reverse proxy Start9 services (not necessarily exposing them to the internet).
I know from other posts that an upcoming update to start9 would allow for more sophisticated networking, but until then we’re stuck.
What I was trying to do is use nginx to reverse proxy services inside start9.
Here’s an example:
events {
# Optional: Specify event handling parameters
# For example:
# worker_connections 1024;
}
# Define the HTTP block
http {
# Define the server block
server {
# Listen on port 80 (HTTP)
listen 80;
location / {
proxy_pass https://rv7k4bmgyrvwxbq6wzfoxgfb32cyhevn636johpz4taucoghw5jp5oid.local;
# Proxy headers
proxy_set_header Host rv7k4bmgyrvwxbq6wzfoxgfb32cyhevn636johpz4taucoghw5jp5oid.local;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Enable WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
# Additional headers (if needed)
proxy_set_header Referer $http_referer;
proxy_set_header User-Agent $http_user_agent;
}
}
}
The issue here is that even though I’m providing the address of an installed service, it still gets the start9 home page. Which is similar to curl
.
When curl some-name.local
- it gets the StartOS home page. And when curl someServiceRandomName.local
- the result is still StartOS. I assumed that providing the Host header would fix it, but that wasn’t the case.
Now I’m not an expert on these things.
So, I’m curious if it’s possible at all to reach the services via a reverse proxy?