Feature Request for busybox-httpd

I was tinkering with a box I have bb-httpd installed on and didn't think far enough ahead, realizing there's no method for "Virtual Hosting" similar to that for Apache. This feature request may prove worthwhile for many who use it:

When handling a caller request, take the URL and break out just the domain portion (www·somewhere·com) and in the $_ROOT directory, see if a directory named "www·somewhere·com" exists. If so, set $_ROOT to that directory for that connection. If it does not exist, remove any host names (leaving "somewhere·com") and repeat the process. If that does not exist, use the default $_ROOT directory. The logic to accomplish this is rather simple and I cannot foresee any security issues by doing so (any more than would exist just by navigating to hostname/somewhere.com)

1 Like

What does uhttpd not do that a basic user would need?

nginx is available on v19 and master for "sophisticated" use (assuming that you consider it appropriate to run a webserver on a router).

1 Like

Here is some workaround Poor man's virtual hosts