How do I set up PhotoStructure to run under a virtual directory? I’ve tried using nginx to proxy a virtual directory for the library, and I hit the landing page, but then PhotoStructure redirects back to root.
@tkohhh He currently is running three instances — that’s where the three different ports are coming from.
@awojtas, I’ve used absolute paths everywhere (both in the fronted router and backend router). It turns out that relative pathing is a bit of a bear to manage when URLs have arbitrary depth (like /tags/fs/foldername/subfolder/…).
I just found that Express supports mounting routers on subpaths using .use, so this may not be the nightmare I was expecting–I basically can keep my absolute paths, but add a new setting (that defaults to /) to absolute-ify paths (instead of just hard-coded /)
I’d also need to be able to send this sub-path to the frontend to let that router handle things properly as well.
(What would a good name for this setting be? webserverMountpoint? httpLocation? )
(I’m changing this to be a feature request and voting for it)
Thanks for the reply, yup @mrm you got my use-case, and appreciate the clarification that PS can’t currently do this because it expects absolute paths everywhere, helpful to know so I won’t keep banging my head against a wall trying to make it work.
I’ll keep checking back every so often in case this changes one day and it can support being hosted in a virtual directory.
I think a good setting name would be “virtualDirectoryPath”, and the default value is “/”, which is current behaviour. But you can override it with whatever you like.
Is this feature required to run PhotoStructure behind nginx, or just to support multiple instances on the same machine? I’m looking to run PS behind nginx (a single instance), but I’m running into the same url rewriting issue.
For what it’s worth, I remember having to do something similar when running Radarr/Sonarr/etc. You can specify a urlBase to support reverse proxying: