如何将重定向HTTP阻止到GitLab服务器中的HTTP?

发布于 2025-01-21 11:19:12 字数 193 浏览 3 评论 0原文

我正在服务器上托管Gitlab -CE,我想禁用重定向HTTP-> https 在另一个词中,我想释放我的端口(80) 我已经在gitlab.rb中更改了此配置:

nginx ['redirect_http_to_https'] = false

,但它不起作用。 我应该怎么办?

I'm hosting gitlab-ce on my server and I want to disable redirecting HTTP -> HTTPS
in another word I want to free up my port(80)
I've already changed this config in gitlab.rb:

nginx['redirect_http_to_https'] = false

but it didn't work.
What should I do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

So要识趣 2025-01-28 11:19:12

默认情况下,GitLab将在external_url中指定的端口上侦听; 80默认情况下,如果没有明确的端口号。

有两种更改端口号的方法:

  1. 将端口号添加到external_url喜欢https://gitlab.example.com:8080
  2. set nginx ['listy__port [ '] - 当您在逆转录后面并想更改收听端口,但不使用主机名中的端口号时,这很有用。如果您不使用反向代理,这可能会导致问题!

You can also disable https by setting nginx['listen_https'] = false

See

By default, GitLab will listen on the port specified in external_url; 80 by default if there's no explicit port number.

There are two ways to change the port number:

  1. Add a port number to external_url like https://gitlab.example.com:8080
  2. Set nginx['listen_port'] -- this useful when you are behind a reverse-proxy and want to change the listen port, but not use the port number in the hostname. This will probably cause issues if you're not using a reverse proxy!

You can also disable https by setting nginx['listen_https'] = false

See gitlab nginx settings for more details.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文