• 1 Post
  • 25 Comments
Joined 1 year ago
cake
Cake day: August 2nd, 2023

help-circle







  • You can use the wildcard domain

    Yeah the problem was more that this machine is running on a network where I don’t really control the DNS. That is to say, there’s a shitty ISP router with DHCP and automatic dynamic DNS baked in, but no way to add additional manual entries for vhosts.

    I thought about screwing with the /etc/hosts file to get around it but what I ended up doing instead is installing a pihole docker for DNS (something I had been contemplating anyway), pointing it to the router’s DNS, so every local DNS name still resolves, and then added manual entries for the vhosts.

    Another issue I didn’t really want to deal with was regenerating the TLS certificate for the nginx server to make it valid for every vhost, but I just bit through that bullet.


  • I was afraid it was going to come down to that. I have been looking into configuration options for the apps, but they’re 3rd party nodejs apps and I know jack shit about nodejs so I’ve had no luck with it so far.

    Going with vhosts anyway (despite the pains it will create on this setup) seems to be the preferred way forward then.

    Thanks for the insight, and for confirming what I already suspected.



  • Hmm no, that’s not really it… that’s more so that you don’t pass URLs starting with /app1/ onwards to the application, which would not be aware of that subpath.

    I think I need something that intercepts the content being served to the client, and inserts /app1/ into all hardcoded absolute paths.

    For example, let’s say on app1’s root I have an index.html that contains:

    ...
    src="/static/image.jpg"
    ...
    

    It should be dynamically served as:

    ...
    src="/app1/static/image.jpg"
    ...