Ceph RGW 和 niginx 配置要点

cat /etc/nginx/sites-enabled/rgw.conf
server {
listen 80 default;
#server_name .com .com.cn .net .cn .org .tv .cc .hk .tw;
server_name ceph-rgw;

client_max_body_size 20M;

location / {
fastcgi_pass_header Authorization;
fastcgi_pass_request_headers on;

include fastcgi_params;

fastcgi_pass unix:/var/run/ceph/ceph.rgw1.fastcgi.sock;
}

}

cat /etc/ceph/ceph.conf

[client.rgw.1]

#rgw_frontends = "civetweb port=80 num_threads=500"
rgw_frontends = fastcgi
rgw_thread_pool_size = 256
rgw_override_bucket_index_max_shards = 20

keyring = /etc/ceph/ceph.client.rgw1.keyring

rgw_socket_path = /var/run/ceph/ceph.rgw1.fastcgi.sock

rgw_print_continue = false

#下面参数要打开,否则PUT会报错 411 Content-Length required error

rgw_content_length_compat = true

#rgw_num_rados_handles = 1

#rgw_cache_enabled = false  测试RGW性能时要关闭cache

注意要修改sock访问权限:

chmod 777 /var/run/ceph

chmod 777 /var/run/ceph/ceph.rgw1.fastcgi.sock

上一篇:Android的file文件操作详解


下一篇:android 4.0后不允许屏蔽掉home键