简介:
通过nginx实现ceph对象存储高可用
配置:
# cat ceph-files.itnul.com
upstream ceph-files.itnul.com {
server 10.10.10.27:7480;
server 10.10.10.28:7480;
server 10.10.10.29:7480;
}
server {
listen 80;
server_name ceph-files.itnul.com;
root /home/web/webapps/ceph-files.itnul.com;
location / {
proxy_pass http://ceph-files.itnul.com/First-bucket/;
include proxy.conf;
}
access_log /usr/local/nginx/logs/ceph-files.itnul.com main;
}
server {
listen 443;
server_name ceph-files.itnul.com;
root /home/web/webapps/ceph-files.itnul.com;
ssl on;
ssl_certificate ssl/STAR_51wyq_cn.crt;
ssl_certificate_key ssl/STAR_51wyq_cn.key;
location / {
proxy_pass http://ceph-files.itnul.com/First-bucket/;
include proxy.conf;
}
access_log /usr/local/nginx/logs/ceph-files.itnul.com main;
}
验证:
http://ceph-files.itnul.com/my-cluster/test.txt
https://ceph-files.itnul.com/my-cluster/test.txt