全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 2065|回复: 18
打印 上一主题 下一主题

[美国VPS] 有没有minio代配置的,200¥找人帮忙配置。

[复制链接]
跳转到指定楼层
1#
发表于 2023-11-15 09:41:15 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
有没有minio代配置的,两包华子找人帮忙配置。

主要是要开启minio的域名连接。

现在minio配置好了,chevereto可以通过ip接入,cloudreve接入不了。

怎么才能通过域名形式接入cloudreve和chevereto。

会的tg联系。
3#
发表于 2023-11-15 10:14:32 | 只看该作者
nginx 反代一下就好了。直接用npm也行,那个容易。
4#
 楼主| 发表于 2023-11-15 10:20:23 | 只看该作者
dawnz 发表于 2023-11-15 10:14
nginx 反代一下就好了。直接用npm也行,那个容易。

反代了,死活不行。各种405,400错误。直接ip没问题。
5#
发表于 2023-11-15 10:27:43 | 只看该作者
NodeLoc 发表于 2023-11-15 10:20
反代了,死活不行。各种405,400错误。直接ip没问题。

反代s3的api需要ws
6#
 楼主| 发表于 2023-11-15 10:36:53 | 只看该作者
dawnz 发表于 2023-11-15 10:27
反代s3的api需要ws

现在在chevereto里边是这样,我如果使用域名 s3.xxx.com ,chevereto会自动加前缀, bucketname.s3.xxx.com。然后我把这个域名反代到 127.0.0.1:9000 端口,会提示我 bucket name不存在。

在cloudreve里边上传文件提示文件信息不一致。
7#
发表于 2023-11-15 10:40:14 | 只看该作者
NodeLoc 发表于 2023-11-15 10:36
现在在chevereto里边是这样,我如果使用域名 s3.xxx.com ,chevereto会自动加前缀, bucketname.s3.xxx.c ...

貌似你的反代方向错了

minio需要反代2个端口
1. api
2. console,这个需要ws

如果用子域名的方式,那就是类似于minio.xxx.com转发api,console.xxx.com转发给console,这种最简单。配置的时候直接用minio.xxx.com
8#
发表于 2023-11-15 10:51:08 | 只看该作者
本帖最后由 万亩斜阳 于 2023-11-15 11:09 编辑

首先docker搭建minio,映射好两个端口。
之后域名反代。
我的配置
域名替换成自己的,一个io.baidu.com api,1个控制台console.io.baidu.com
分别申请到2个证书,修改好证书路径
把IP 1.2.3.4修改成自己机器的公网ip。


  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. }
复制代码


反代之后,访问域名,看看是否能正常登录进入minio控制台,创建好存储桶。

chevereto我是用IP连接的,似乎用域名会像你说的用虚拟主机格式,提示错误?
应该是它写的配置不够完善。没考虑到路径模式选项。太久忘记了,不知道是不是这个原因。
应该也可以配置。
但是用IP简单,反正是前段和后端存储之间连接,别人也看不到。
上面内容都正常填写。
Endpoint http://1.2.3.4:9000

最后的url,是图床图片的链接,自己再找一个域名,反代
以存储桶picture为例子。
反代http://1.2.3.4:9000/picture/

nginx文件对照着修改,主要修改域名,证书路径,最后的反代地址
  1. server
  2.     {
  3.         listen 443 ssl;
  4.         #listen [::]:80;
  5.         server_name p1.baidu.com ;

  6.         ssl_certificate /etc/nginx/conf.d/ssl/p1.baidu.com.crt;
  7.         ssl_certificate_key /etc/nginx/conf.d/ssl/p1.baidu.com.key;
  8.         ssl_session_timeout 5m;
  9.         ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
  10.         ssl_prefer_server_ciphers on;
  11.         ssl_session_cache builtin:1000 shared:SSL:10m;
  12.         # openssl dhparam -out /usr/local/nginx/conf/ssl/dhparam.pem 2048
  13.         # ssl_dhparam /usr/local/nginx/conf/ssl/dhparam.pem;

  14.         #error_page   404   /404.html;
  15.         #error_page 404 https://p1.baidu.com$request_uri;        

  16.         # Deny access to PHP files in specific directory
  17.         #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

  18.         #include rewrite/none.conf;

  19.         # Deny access to PHP files in specific directory
  20.         #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

  21.         #include enable-php.conf;
  22.         
  23.         # To allow special characters in headers
  24.         ignore_invalid_headers off;
  25.         # Allow any size file to be uploaded.
  26.         # Set to a value such as 1000m; to restrict file size to a specific value
  27.         client_max_body_size 0;
  28.         # To disable buffering
  29.         proxy_buffering off;

  30.         rewrite  ^/$  /index.html  last;
  31.         
  32.         location / {
  33.             proxy_set_header X-Real-IP $remote_addr;
  34.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  35.             proxy_set_header X-Forwarded-Proto $scheme;
  36.             proxy_set_header Host $http_host;

  37.             proxy_connect_timeout 300;
  38.             # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
  39.             proxy_http_version 1.1;
  40.             proxy_set_header Connection "";
  41.             chunked_transfer_encoding off;

  42.             proxy_pass http://1.2.3.4:9000/picture/;
  43.         }
  44.         access_log  off;
  45.     }

  46. server
  47.         {
  48.         listen 80;
  49.         server_name p1.baidu.com;
  50.         return 301 https://p1.baidu.com$request_uri;
  51.     }  
复制代码


cloudreve刚才安装了一下,添加s3存储,默认强制路径模式。填域名,没出现什么问题。
9#
发表于 2023-11-15 11:49:43 | 只看该作者
200块?我来,联系我
10#
发表于 2023-11-15 13:34:55 来自手机 | 只看该作者
tg: @laoxong
请联系




Misskey! 我有一个博客

Send by DZ Reader
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-19 06:01 , Processed in 0.065839 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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