Backend Nginx Configuration Issue with Port/Protocol Loss in Redirects

Đang mở
#2,493 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
docker-compose, nginx
Lĩnh vực
devops, infrastructure

Hướng nghiên cứu

Mở .examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf và xem xét cấu hình Nginx backend trong thiết lập HTTPS với cổng không tiêu chuẩn được mô tả. Xác nhận rằng các chuyển hướng giữ nguyên giao thức và cổng ban đầu khi cấu hình hoàn tất.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

needs info

The frontend uses Nginx as a reverse proxy with HTTPS enabled, but it utilizes a non-standard web port (e.g., port 8443). After the frontend Nginx reverse proxy, the backend Nginx uses an HTTP connection on port 80. As a result, redirects from the backend lose the original port and protocol.
It is recommended to add absolute_redirect off; to the configuration file at .examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf.

This Nginx location configuration for reverse proxy:
location / {
proxy_pass http://127.0.0.1:80$request_uri;

    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Port $server_port;
    proxy_set_header X-Forwarded-Scheme $scheme;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header Early-Data $ssl_early_data;

    # Websocket
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
}
Ngôn ngữ chính
Shell
Star
7.4k
Fork
1.9k
Merge trung bình
3 giờ 7 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nextcloud/docker

Tất cả issue của nextcloud/docker

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.