Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #3563

Open
gudrutis opened this issue Mar 5, 2024 · 0 comments

Comments

@gudrutis
Copy link

gudrutis commented Mar 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant