Update documentation `Running Kiwi TCMS as a Docker container` to include use cases for `http->https` redirect when using custom host ports that are not `443`
gudrutis opened this issue · comments
Is your feature request related to a problem? Please describe.
When following the tutorial to setup KiwiTCMS using docker (described at docs/source/installing_docker.rst
), I ran into an issue that I could not easily configure nginx
to redirect to a different https
port. As of the latest version per my understanding, there is no way to disable http->https
redirect. If on a host machine, I will mount https
port on a different port than 443
( ex. the port is already taken), the http->https
redirect does not know about it and sends to default https
port on a host server which is still 443
.
In other words, when using custom ports that are not 80
and 443
, http->https
redirect breaks, this situation is not documented and I had to come up with my own solution
Describe the solution you'd like
This is what I did:
- Created a copy of
etc/nginx.conf
asetc/nginx.conf.overwrite
- here
Line 74 in 3867592
return 301 https://$host:2443$request_uri;
- in
Line 28 in 3867592
- ./etc/nginx.conf.overwrite:/Kiwi/etc/nginx.conf
to overwritenginx
configuration with a new one.
Describe alternatives you've considered
Building a docker image from scratch would be overkill in such a situation, in my opinion.
Additional context
I am attaching screenshots to better understand what I did.