docker-library / busybox

Docker Official Image packaging for Busybox
http://busybox.net
388 stars 126 forks source link

How to use with an SPA #178

Closed thomasbouillon closed 1 year ago

thomasbouillon commented 1 year ago

I'm using busybox httpd for an angular project. So i'm just serving dist/, the issue is that how to add a rewrite rule on the requested uri so that if no files match the uri, serve dist/index.html ?

tianon commented 1 year ago

I'm not sure exactly how to help solve your problem, but I think https://github.com/mirror/busybox/blob/1_36_0/networking/httpd.c is probably the best (only?) documentation for BusyBox's limited implementation of httpd :sweat_smile:

I'd probably suggest trying to find an appropriate community support mailing list or forum to ask for more dedicated help (or switch to a more full-featured web server for your static files like NGINX).

thomasbouillon commented 1 year ago

I managed to do it with a fallback on the proxy above the container, thx

johnWhiteMastery commented 3 months ago

I managed to do it with a fallback on the proxy above the container, thx

hi i am also facing a similar issue can you kindly share the way in which you solved this issue, Thanks in advance