public content and/or staticweb

Asked by Christophe Le Guern

Hi,

I'm testing swift 1.3 with the last swift-saio.sh (on one VM) + staticweb configuration.

The goal is to provide static web content.

I did "st" commands to allow public view of a container as follow:

## let's allow everyone read acces
# st -v -A http://192.168.0.10:8080/auth/v1.0 -U swiftops:swiftops -K swiftops post -r '.r:*' test

## Configure web listings
# st -v -A http://192.168.0.10:8080/auth/v1.0 -U swiftops:swiftops -K swiftops post -m 'web-listings: true' test

## let's view stats for test container
# st -v -A http://192.168.0.10:8080/auth/v1.0 -U swiftops:swiftops -K swiftops stat test
----
  Account: AUTH_38d1a353-377a-480c-9188-d703e6e20dcd
Container: test
  Objects: 1
    Bytes: 8988
 Read ACL: .r:*
Write ACL:
Meta Web-Listings: true
---

## let's view stats for account
# st -v -A http://192.168.0.10:8080/auth/v1.0 -U swiftops:swiftops -K swiftops stat
----
StorageURL: http://192.168.0.10:8080/v1/AUTH_38d1a353-377a-480c-9188-d703e6e20dcd
Auth Token: AUTH_tk50297fbd597444a787e72baecc16e5db
   Account: AUTH_38d1a353-377a-480c-9188-d703e6e20dcd
Containers: 2
   Objects: 4
     Bytes: 74809
---

Then, I'm able to view the content listing with a web browser using the following URL:
 http://192.168.0.10:8080/v1/AUTH_38d1a353-377a-480c-9188-d703e6e20dcd/test/

The questions are:
- am I correct with this method ?
- is there a way to get prettier URLs such as http://192.168.0.10:8080/test/ or http://test.mydomain.com/ ?

Thanks,
Christophe

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
gholt
Solved:
Last query:
Last reply:
Revision history for this message
Best gholt (gholt) said :
#1

Looks correct. Currently there is no prettier way for URLs. It should be relatively easy to write such as WSGI middleware if you wish, though I suspect someone will get to that eventually -- it's just not on anyone's timeline right now.

Revision history for this message
Christophe Le Guern (c35sys) said :
#2

Thanks gholt, that solved my question.