全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 1227|回复: 6
打印 上一主题 下一主题

[美国VPS] MINIO使用域名反代 9000 端口,死活连接不上

[复制链接]
跳转到指定楼层
1#
发表于 2023-11-14 19:41:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
2#
发表于 2023-11-14 19:48:21 | 只看该作者
我用宝塔的面板直接反代就可以了,然后控制台的要加一个websocket配置就没了。我是两个控制台和分发两个域名
3#
 楼主| 发表于 2023-11-14 19:49:06 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
4#
发表于 2023-11-14 19:51:48 | 只看该作者
BackDoor 发表于 2023-11-14 19:49
我用宝塔的反代不行。搞死了。一直连不上。

你minio用docker吗?另外你是打不开还是控制台进不去。可以的话把minio的配置文件发一下可以看看
5#
 楼主| 发表于 2023-11-14 19:54:43 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
6#
发表于 2023-11-14 19:58:07 | 只看该作者
BackDoor 发表于 2023-11-14 19:54
是 配置 s3 连不上,使用端口就可以。使用反代的域名连不上。

你试试用服务器ip而不是127.0.0.1试试
7#
发表于 2023-11-15 10:40:19 | 只看该作者
没那么复杂吧。
我的。
域名替换成自己的,一个io.baidu.com api,1个控制台console.io.baidu.com
申请证书,修改好路径
docker搭建映射好端口,把IP 1.2.3.4修改成自己的。

  1. server {
  2.         listen 80;
  3.         server_name io.baidu.com;

  4.         #如果需要http 301跳转到 https 需要将下面行前面的 # 注释去掉,并重载nginx
  5.         return 301 https://$host$request_uri;
  6.         access_log off;
  7. }

  8. server {
  9.         listen 443 ssl;
  10.         #listen [::]:443 ssl http2;
  11.         server_name io.baidu.com;

  12.         ssl_certificate /etc/nginx/conf.d/ssl/io.baidu.com.crt;
  13.         ssl_certificate_key /etc/nginx/conf.d/ssl/io.baidu.com.key;
  14.         ssl_session_timeout 5m;
  15.         ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
  16.         ssl_prefer_server_ciphers on;
  17.         ssl_ciphers "TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
  18.         ssl_session_cache builtin:1000 shared:SSL:10m;

  19.         # To allow special characters in headers
  20.         ignore_invalid_headers off;
  21.         # Allow any size file to be uploaded.
  22.         # Set to a value such as 1000m; to restrict file size to a specific value
  23.         client_max_body_size 0;
  24.         # To disable buffering
  25.         proxy_buffering off;

  26.         # Proxy requests to the bucket "photos" to MinIO server running on port 9000
  27.         location / {
  28.             proxy_set_header X-Real-IP $remote_addr;
  29.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  30.             proxy_set_header X-Forwarded-Proto $scheme;
  31.             proxy_set_header Host $http_host;

  32.             proxy_connect_timeout 300;
  33.             # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
  34.             proxy_http_version 1.1;
  35.             proxy_set_header Connection "";
  36.             chunked_transfer_encoding off;
  37.             
  38.             #开启websocket连接
  39.             proxy_set_header Upgrade $http_upgrade;
  40.             proxy_set_header Connection "upgrade";

  41.             proxy_pass http://1.2.3.4:9000;
  42.         }
  43. }


  44. server {
  45.         listen 443 ssl;
  46.         #listen [::]:443 ssl http2;
  47.         server_name console.io.baidu.com;

  48.         ssl_certificate /etc/nginx/conf.d/ssl/console.io.baidu.com.crt;
  49.         ssl_certificate_key /etc/nginx/conf.d/ssl/console.io.baidu.com.key;
  50.         ssl_session_timeout 5m;
  51.         ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
  52.         ssl_prefer_server_ciphers on;
  53.         ssl_ciphers "TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
  54.         ssl_session_cache builtin:1000 shared:SSL:10m;
  55.         # openssl dhparam -out /usr/local/nginx/conf/ssl/dhparam.pem 2048
  56.         # ssl_dhparam /usr/local/nginx/conf/ssl/dhparam.pem;
  57.         # To allow special characters in headers
  58.         ignore_invalid_headers off;
  59.         # Allow any size file to be uploaded.
  60.         # Set to a value such as 1000m; to restrict file size to a specific value
  61.         client_max_body_size 0;
  62.         # To disable buffering
  63.         proxy_buffering off;

  64.         location / {
  65.             proxy_set_header X-Real-IP $remote_addr;
  66.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  67.             proxy_set_header X-Forwarded-Proto $scheme;
  68.             proxy_set_header Host $http_host;

  69.             proxy_connect_timeout 300;
  70.             # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
  71.             proxy_http_version 1.1;
  72.             proxy_set_header Connection "";
  73.             chunked_transfer_encoding off;

  74.             #开启websocket连接
  75.             proxy_set_header Upgrade $http_upgrade;
  76.             proxy_set_header Connection "upgrade";

  77.             proxy_pass http://1.2.3.4:9001;
  78.             # If you are using docker-compose this would be the hostname i.e. minio
  79.             # Health Check endpoint might go here. See https://www.nginx.com/resources/wiki/modules/healthcheck/
  80.             # /minio/health/live;
  81.         }
  82. }
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-12-16 04:36 , Processed in 0.060357 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表