kiwitcms / Kiwi

open source test management system with over 2 million downloads!

Home Page:https://kiwitcms.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 as etc/nginx.conf.overwrite
  • here
    return 301 https://$host$request_uri;
    included port like this return 301 https://$host:2443$request_uri;
  • in
    volumes:
    added line - ./etc/nginx.conf.overwrite:/Kiwi/etc/nginx.conf to overwrite nginx 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.

kiwi1

kiwi2