Static website hosting is not working

Hello to you all!

By attempting to take advantage of Storj awesomeness, I was trying to deploy some resources for my static website. I would like to publish my assets bucket on http://assets.tommi.space. Unfortunately, it does not work.

I already thoroughly read the other posts about static website publishing issues, nevertheless I am still having trouble.

My steps

  1. Uploading to the assets bucket all of my files and folders, via web browser
  2. Running uplink share --dns assets.tommi.space sj://assets/ --base-url link.eu1.storjshare.io on my MacOS device, getting as a result (DELETED_FOR_SECURITY_REASONS are strings I replaced to make sure posting here is safe):
Sharing access to satellite 12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs@eu1.storj.io:7777
=========== ACCESS RESTRICTIONS ==========================================================
Download  : Allowed
Upload    : Disallowed
Lists     : Allowed
Deletes   : Disallowed
NotBefore : No restriction
NotAfter  : No restriction
Paths     : sj://assets/ (entire bucket)
=========== SERIALIZED ACCESS WITH THE ABOVE RESTRICTIONS TO SHARE WITH OTHERS ===========
Access    : DELETED_FOR_SECURITY_REASONS
========== CREDENTIALS ===================================================================
Access Key ID: jxfhdmvxnvexchbmawmlejtvg2eq
Secret Key   : DELETED_FOR_SECURITY_REASONS
Endpoint     : https://gateway.us1.storjshare.io
Public Access:  true
=========== DNS INFO =====================================================================
Remember to update the $ORIGIN with your domain name. You may also change the $TTL.
$ORIGIN example.com.
$TTL    3600
assets.tommi.space    	IN	CNAME	.
txt-assets.tommi.space	IN	TXT  	storj-root:assets
txt-assets.tommi.space	IN	TXT  	storj-access:jxfhdmvxnvexchbmawmlejtvg2eq
  1. I add to my Gandi DNS zone the following:
  • assets 3600 IN CNAME link.eu1.storjshare.io.
  • txt-assets 3600 IN TXT "storj-access:jxfhdmvxnvexchbmawmlejtvg2eq"
  • txt-assets 3600 IN TXT "storj-root:assets/"
  • If I try to insert $ORIGIN assets.tommi.space., I get the error assets.tommi.space.: is not a valid datatype
  1. I have the file zattere.jpg in the root of my assets bucket; if I try to visit http://assets.tommi.space/zattere.jpg, I see this:
  2. If I go on the web browser platform and I click on “share” for zattere.jpg, the file is perfectly reachable at https://link.eu1.storjshare.io/s/jxi37mc2nnhwyztah5jo6ctfe7oq/assets/zattere.jpg (I did notice that the access code in this link is different with respect to the one in my DNS zone. I tried to replace it, but the outcome is the same)
  3. The DNS propagation shows that the URL does not point to a Fastly server at all

What can I do? Is there something I am missing or there is some bug somewhere?

Thanks a lot in advance!

Best,
Tommi

Hello @tommi !

Your path/url should not contain the /assets/ anymore. Your jpg is reachable just fine via

assets.tommi.space/zattere.jpg

If you want to keep your assets directory in place, you would need to move them inside your assets bucket into a folder called assets :smiley:

3 Likes

Thanks a lot! Is there a way I can make all of the folders content available in the root? For example, suppose I have sj://assets/images/example1.jpg and sj://assets/videos/example2.mov, can I make them available respectively at http://assets.tommi.space/example1.jpg and http://assets.tommi.space/example2.mov?

Not within the storj network no. You could look into a rewrite rule set for the proxy/SSL termination service if you intend to use one.

3 Likes

Thanks a lot, you have been very helpful!