The original post: /r/nginx by /u/Purple_Ad1641 on 2025-03-01 21:48:36.
I have configured all your micro services (in LXC containers) with IPv6, and setup dyndns for all of them so they update their GUA with my domain registrar.
I am trying to setup some infrastructure to access my services from outside of my local network.
Here is what I have so far:
- Spin up a auth(authelia) + proxy(nginx) server.
- Add a rule in opnsense to forward all traffic on port 443 to this server.
- Add configuration for each service in the nginx config file. Example nextcloud:
server { listen 443 ssl http2; server_name nextcloud.*; … location / { … proxy_pass $upstream } }
Is it possible to configure the nginx to do a proxy_pass in a generic way, so I don’t have add separate server blocks in nginx.conf for each of my services, since I am using IPv6 GUA addresses everywhere?
I searched on google and reddit but all examples I could find deal with a reverse proxy setup when each service has to be configured individually.
Any advice/hints? Thanks in advance !