-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
separate meta presets for virtual hosts #272
Comments
I have implemented this and added couple more tests for secret handling. It always works in vhosts mode, even if there's just one hostname. It errors out on launch if the I'm still looking into the possibility of how to limit paths in |
Sorry for not getting back the last couple of weeks. My current solution runs for a month on my server without problems: https://github.com/michaelnordmeyer/agate/tree/272-separate-meta-presets-for-virtual-hosts |
Since there seem to be some other things done on that branch, the relevant commit seems to be michaelnordmeyer@1c031ec Forcing virtual hosts would break many current configurations (as can be seen by editing almost all tests) so I do not think it is a good idea. The current behaviour is that separate host directories are only used if more than one hostname is provided on the CLI, and I think that fits the "very simple" aspect of agate's self description: If you only have one hostname (and I suspect many people have) you just have a content directory that you put stuff in and having a Breaking the behaviour of the central configuration flag in the multiple hostnames scenario is in my opinion a better solution, as I would expect it to be more rare. It would still present a breaking change either way. |
Yes, I mentioned this and even wrote some code to at least log this. It's not a nice situation to be in. What's missing from your rationale is that currently Agate answers on all subdomains, if you have subdomains configured. This is not an unlikely case, because most people have at least To avoid all this and trigger vhost support, you have to use a fake second domain as the second hostname, which won't be served, because no DNS entry points to this IP for this fake name, and create subdirectories. Because of this, I consider the convenience feature of having a content root directory without a subdirectory for the one specifically served domain a design flaw. At least that's how vhosts are implemented. It was a reasonable idea, but with issues. If you don't want to break people's capsule, this is fine. I can maintain my own branch and will likely switch in the mid-term to another Gemini server anyway, because I want to reduce reliance on other people's Gemini services and host some CGI scripts. Anyway, please don't take this as harsh or bitter. I'm more willing to break things than others, if the end result is having a more robust system for the future. And there's still the chance to create directories for users, move |
When using the
--central-conf
flag, the configuration must always be placed in the root content directory. However, when using multiple hostnames, i.e. virtual hosts, there are separate content directories for each host. Hence it would be nice if each vhost would have their own.meta
file in their respective content directory, e.g. like this:The text was updated successfully, but these errors were encountered: