On 01/13/2018 11:26 PM, Constantine Vassilev wrote: > Here is how I implemented it: >
Well -- just to be clear: I think my solution is wrong. I didn't understand how http.ServeMux worked: https://golang.org/pkg/net/http/#ServeMux Andy Balholm pointed out that http.Handle() can accept a domain name name as part of the pattern in the first argument: On 01/09/2018 02:34 PM, Andy Balholm wrote: > Try: > > http.Handle(“domain1.com/assets/", http.StripPrefix("/", http.FileServer(http.Dir(*webrootdomain1)))) > http.Handle(“domain2.com/assets/", http.StripPrefix("/", http.FileServer(http.Dir(*webrootdomain2)))) > If you're going to use the default http.Server and http.ServeMux, I think that's the way to go. Please disregard my wrong response. -ayan -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.