jackrabbits-palace / main

:rabbit: :jack_o_lantern: all-in-one reverse-proxy | ddns client | ssh tunnel for us :jack_o_lantern: :rabbit:
GNU Affero General Public License v3.0
4 stars 0 forks source link

automate adding (sub)domains to reverse-proxy config #1

Open aguestuser opened 6 years ago

aguestuser commented 6 years ago

Overview

currently, in order to add (sub)domains to the Nginx reverse-proxy, one must edit the /etc/nginx/default.conf file (in a very specific way). This is annoying. It would be really nice to just specify a domain that you want, along with a destination IP address and port for your service.

Implementation Notes

one idea: make a /domains directory with config files for every domain you want to create. the script scans the directory, sources what it needs from the configs, and configures accordingly (credentials could also be read this way)

eg:

/domains
|
--- /serious.town
|   |
|    --- (some stuff)
|
 --- /slime.church
|     |
|     --- (some more stuffs)
|
 --- etc.

another idea: eventually this tree structure could be re-represented as a yml file.