With AdGuard I can easily just block this request or redirect it to whatever, but I was curious to know if there was any easy way to "locally generate" on the router a 204 code to return to that request. It doesn't seem that I would need a full-blown server to send such a simple aknowledgment, and I was wondering if anybody had ever toyed with this idea on their router.
But therefor I don't know if the location section is limitated or just works like a typical anonymous block as a adder to current code, that is just a wild assumption without checking the docs, you need to test this
make sure that the dns points to the router and if that is still not enough you could point the dns domain to your router as forwarder.
Note that the server_name is really important, if you remove this line you may break the entire ui, you want it specific having it rule to a specific domain.
the whole UI becomes unaccessible. I undid those changes through SSH.
Once I make it work, I'll have to figure out 1. how to test that it works properly, 2. which rewrite rule I should implement in AdGuard. I'll investigate and report if I can find an answer.
Second error was the bucket size, for this you need to edit nginx.conf and under http add this:
server_names_hash_bucket_size 64;
It seems you need to increase with the power by 2 if you gonna use more domains, in this case we went from 32 to 64.
But this then gave me a wildcard for all domains and not only the server name as directive I had to investigate this in nginx.conf.
So this let me assume you may have to add your own includes and bring back sites-available and sites-enabled because conf.d is already part by the http instance defined with gl things in nginx.conf that is where conf.d is included and that is probably why it does ignore the server_name as virtual host.
Hope this helps a bunch, I have had not the time to further expand this.
Hi! Thanks a lot for all the additional investigation -- what I have currently seems to be working, but I'll make sure to get back and have a look if I ever want to improve or refine further. Thanks again!
with 192.168.8.1 being the address of the router of course. This way, the /generate_204 requests get served locally ,it seems to be working flawlessly.