]> git.proxmox.com Git - ceph.git/blob - ceph/examples/rgw/rgw-cache/nginx.conf
update ceph source to reef 18.1.2
[ceph.git] / ceph / examples / rgw / rgw-cache / nginx.conf
1
2 user nginx;
3 #Process per core
4 worker_processes auto;
5 pid /var/run/nginx.pid;
6 events {
7 #Number of connections per worker
8 worker_connections 1024;
9 }
10
11
12 http {
13 types_hash_max_size 4096;
14 lua_package_path '/usr/local/openresty/lualib/?.lua;;';
15 aws_auth $aws_token {
16 # access key and secret key of the cache
17 # Please substitute with the access key and secret key of the amz-cache cap user
18 access_key cache;
19 secret_key cache;
20 service s3;
21 region us-east-1;
22 }
23 # This map is used to choose the original authorization header if the aws_auth module refuse to create one
24 map $aws_token $awsauth {
25 default $http_authorization;
26 ~. $aws_token; # Regular expression to match any value
27 }
28 map $request_uri $awsauthtwo {
29 "/" $http_authorization;
30 "~\?" $http_authorization;
31 default $awsauth;
32 }
33 map $request_method $awsauththree {
34 default $awsauthtwo;
35 "PUT" $http_authorization;
36 "HEAD" $http_authorization;
37 "POST" $http_authorization;
38 "DELETE" $http_authorization;
39 "COPY" $http_authorization;
40 }
41 map $http_if_match $awsauthfour {
42 ~. $http_authorization; # Regular expression to match any value
43 default $awsauththree;
44 }
45 include /etc/nginx/mime.types;
46 default_type application/octet-stream;
47 log_format main '$remote_addr - $remote_user [$time_local] "$request" '
48 '$status $body_bytes_sent "$http_referer" '
49 '"$http_user_agent" "$http_x_forwarded_for"';
50 error_log /var/log/nginx/error.log;
51 access_log /var/log/nginx/access.log main;
52
53 sendfile on;
54 tcp_nodelay on;
55 keepalive_timeout 65;
56 include /etc/nginx/conf.d/*.conf;
57 }