despite the examples that can be found on the internet I have troubles
setting up a static website that serves from a S3 bucket If anyone
could
point me in the right direction that would be much appreciated
Marcel
I created an index.html in the bucket sky
gm-rc3-jumphost01@ceph/s3cmd (master)$ ./s3cmd info
s3://sky/index.html
s3://sky/index.html (object):
File size: 42046
Last mod: Tue, 30 Mar 2021 13:28:02 GMT
MIME type: text/html
Storage: STANDARD
MD5 sum: 93acaccebb23a18da33ec4294d99ea1a
SSE: none
Policy: none
CORS: none
ACL: *anon*: READ
ACL: Generic Sky Account: FULL_CONTROL
And curl returns
gm-rc3-jumphost01@tmp/skills$ curl
https://sky.static.gm.core.local/index.html
<html>
<head><title>404 Not Found</title></head>
<body>
<h1>404 Not Found</h1>
<ul>
<li>Code: NoSuchWebsiteConfiguration</li>
<li>BucketName: sky</li>
<li>RequestId:
tx0000000000000000000ba-00606327b8-cca124-rc3-gm</li>
<li>HostId: cca124-rc3-gm-rc3</li>
COnfig of de rados instance
[client.radosgw.rc3-gm]
debug_rgw = 20
ms_debug = 1
rgw_zonegroup = rc3
rgw_zone = rc3-gm
rgw_enable_static_website = true
rgw_enable_apis = s3website
rgw expose bucket = true
rgw_dns_name = gm-rc3-radosgw.gm.core.local
rgw_dns_s3website_name = static.gm.core.local
rgw_resolve_cname = true
host = gm-rc3-s3web01
keyring = /etc/ceph/ceph.client.radosgw.rc3-gm.keyring
log_file = /var/log/ceph/radosgw.log
user = ceph
rgw_frontends = civetweb port=443s
ssl_certificate=/etc/ceph/ssl/key_cert_ca.pem
DNS (from pdnsutil list-zone)
*.static.gm.core.local 3600 IN CNAME
gm-rc3-s3web01.gm.core.local
The logs shows
2021-03-30 15:32:53.725 7ff760fcd700 2
RGWDataChangesLog::ChangesRenewThread: start
2021-03-30 15:32:58.409 7ff746798700 20 HTTP_ACCEPT=*/*
2021-03-30 15:32:58.409 7ff746798700 20
HTTP_HOST=sky.static.gm.core.local
2021-03-30 15:32:58.409 7ff746798700 20 HTTP_USER_AGENT=curl/7.58.0
2021-03-30 15:32:58.409 7ff746798700 20 HTTP_VERSION=1.1
2021-03-30 15:32:58.409 7ff746798700 20 REMOTE_ADDR=10.128.160.47
2021-03-30 15:32:58.409 7ff746798700 20 REQUEST_METHOD=GET
2021-03-30 15:32:58.409 7ff746798700 20 REQUEST_URI=/index.html
2021-03-30 15:32:58.409 7ff746798700 20 SCRIPT_URI=/index.html
2021-03-30 15:32:58.409 7ff746798700 20 SERVER_PORT=443
2021-03-30 15:32:58.409 7ff746798700 20 SERVER_PORT_SECURE=443
2021-03-30 15:32:58.409 7ff746798700 1 ====== starting new request
req=0x7ff746791740 =====
2021-03-30 15:32:58.409 7ff746798700 2 req 196 0.000s initializing
for
trans_id = tx0000000000000000000c4-006063288a-cca124-rc3-gm
2021-03-30 15:32:58.409 7ff746798700 10 rgw api priority: s3=-1
s3website=1
2021-03-30 15:32:58.409 7ff746798700 10 host=sky.static.gm.core.local
2021-03-30 15:32:58.409 7ff746798700 20 subdomain=sky
domain=static.gm.core.local in_hosted_domain=1
in_hosted_domain_s3website=1
2021-03-30 15:32:58.409 7ff746798700 20 final domain/bucket
subdomain=sky domain=static.gm.core.local in_hosted_domain=1
in_hosted_domain_s3website=1 s->info.domain=static.gm.core.local
s->info.request_uri=/sky/index.html
2021-03-30 15:32:58.409 7ff746798700 20 get_handler
handler=29RGWHandler_REST_Obj_S3Website
2021-03-30 15:32:58.409 7ff746798700 10
handler=29RGWHandler_REST_Obj_S3Website
2021-03-30 15:32:58.409 7ff746798700 2 req 196 0.000s getting op 0
2021-03-30 15:32:58.409 7ff746798700 10
op=28RGWGetObj_ObjStore_S3Website
2021-03-30 15:32:58.409 7ff746798700 2 req 196 0.000s s3:get_obj
verifying requester
2021-03-30 15:32:58.409 7ff746798700 20 req 196 0.000s s3:get_obj
rgw::auth::StrategyRegistry::s3_main_strategy_t: trying
rgw::auth::s3::AWSAuthStrategy
2021-03-30 15:32:58.409 7ff746798700 20 req 196 0.000s s3:get_obj
rgw::auth::s3::AWSAuthStrategy: trying
rgw::auth::s3::S3AnonymousEngine
2021-03-30 15:32:58.409 7ff746798700 20 req 196 0.000s s3:get_obj
rgw::auth::s3::S3AnonymousEngine granted access
2021-03-30 15:32:58.409 7ff746798700 20 req 196 0.000s s3:get_obj
rgw::auth::s3::AWSAuthStrategy granted access
2021-03-30 15:32:58.409 7ff746798700 2 req 196 0.000s s3:get_obj
normalizing buckets and tenants
2021-03-30 15:32:58.409 7ff746798700 10 s->object=index.html
s->bucket=sky
2021-03-30 15:32:58.409 7ff746798700 2 req 196 0.000s s3:get_obj init
permissions
2021-03-30 15:32:58.409 7ff746798700 15 decode_policy Read
AccessControlPolicy<AccessControlPolicy
xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>sky</ID><DisplayName>Generic
Sky Account</DisplayName></Owner><AccessControlList><Grant><Grantee
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="CanonicalUser"><ID>sky</ID><DisplayName>Generic Sky
Account</DisplayName></Grantee><Permission>FULL_CONTROL</Permission></Grant></AccessControlList></AccessControlPolicy>
2021-03-30 15:32:58.409 7ff746798700 20 get_system_obj_state:
rctx=0x7ff74678f310 obj=rc3-gm.rgw.meta:users.uid:anonymous
state=0x55835be11220 s->prefetch_data=0
2021-03-30 15:32:58.409 7ff746798700 10 cache get:
name=rc3-gm.rgw.meta+users.uid+anonymous : hit (negative entry)
2021-03-30 15:32:58.409 7ff746798700 2 req 196 0.000s s3:get_obj
recalculating target
2021-03-30 15:32:58.409 7ff746798700 10 retarget Starting retarget
2021-03-30 15:32:58.409 7ff746798700 10
RGWHandler_REST_S3Website::error_handler err_no=-2039 http_ret=404
2021-03-30 15:32:58.409 7ff746798700 20 No special error handling
today!
2021-03-30 15:32:58.409 7ff746798700 20 op->ERRORHANDLER: err_no=-2039
new_err_no=-2039
2021-03-30 15:32:58.409 7ff746798700 2 req 196 0.000s s3:get_obj op
status=0
2021-03-30 15:32:58.409 7ff746798700 2 req 196 0.000s s3:get_obj http
status=404
2021-03-30 15:32:58.409 7ff746798700 1 ====== req done
req=0x7ff746791740 op status=0 http_status=404 latency=0s ======
2021-03-30 15:32:58.409 7ff746798700 20 process_request() returned
-2039
2021-03-30 15:32:58.409 7ff746798700 1 civetweb: 0x55835b24e000:
10.128.160.47 - - [30/Mar/2021:15:32:58 +0200] "GET /index.html
HTTP/1.1" 404 511 - curl/7.58.0
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx