How to configure authentication and ssl on ipfs gateway port 8080?

@hector @dmellos on the same HTTPS-HTTP proxying task I encountered a very strange problem with Apache described here: Apache as HTTPS Reverse Proxy for IPFS Node: memory leak

Could you please have a look at this? I really need to find a way to resolve this… Sorry for spamming here, but I already created another question.