SteveLTN / https-portal

A fully automated HTTPS server powered by Nginx, Let's Encrypt and Docker.
MIT License
4.41k stars 295 forks source link

Host + Path Redirect #341

Closed tinohager closed 7 months ago

tinohager commented 8 months ago

Many thanks for the great project!

I am currently developing a larger application based on multiple Docker containers and would like to run it behind the same domain. Have you ever thought about offering a configuration with which I can, for example, forward all requests from ? example.com/crm to my crm docker container. And the rest go to the primary docker container of example.com?

location /crm/ {
    proxy_pass $crm_backend;
}
SteveLTN commented 7 months ago

Hi!

The dilemma here is that if I add more features, I need to add support for people to configure the features. Then I have to "reinvent" some syntax of configuration, and eventually the configuration will need some extensive study to achieve what people want to.

But there is already such a syntax! The Nginx configuration file! Surely spending some time learning Nginx configuration would be more useful for you than learning some custom syntax specific to HTTPS-PORTAL, because the latter you won't be able to apply anywhere else.

The way I approach it then is to allow overriding Nginx configs. You should be able to configure what you want to achieve through Nginx config, and keep the HTTPS-PORTAL functionality :-)