Static Website Not Working

After following this tutorial, Host a Static Website with the Uplink CLI and Linksharing Service - Storj DCS, I get linked to Storj but it’s a page that says Malformed Request. Please Try Again. I really don’t know what I could be doing wrong as I’ve gone through it several times and am just trying to use a bucket and folder with an index.html file and a 404.html file in the folder.

1 Like

hi @chad sorry to hear that is happening to you. I think Ive only heard of this issue once before awhile back, but not in our most recent sprints.
Its a bit late in this timezone, but I’m happy to try and work this out with you over this thread during business hours .
In the meantime any additional detail, screenshots etc are always helpful.

Hi @jocelyn, so I setup the Uplink CLI using this article, Create Access Grant in CLI - Storj DCS.
Then I made a bucket titled site and within the bucket have a folder titled src with two files in src titled index.html and 404.html
From there I used the link I posted in the first post (new user can only post two links), for sharing the bucket I used ./uplink.exe share --dns www.DOMAINNAME.us sj://site/src
And from there I used the output that was generated to create the CNAME and two txt- records.

Hello @Chad ,
Welcome to the forum!

Did you update $ORIGIN?
In your example it should be

$ORIGIN DOMAINNAME.us.
$TTL    3600
www            IN      CNAME   link.us1.storjshare.io.
txt-www        IN      TXT     storj-root:site/src
txt-www        IN      TXT     storj-access:uitnlehiotERYTEGmkerlg

In additional, you should be able to see your bucket in the browser, you can construct the URL like this:
https://link.us1.storjshare.io/uitnlehiotERYTEGmkerlg/site/src/
Where uitnlehiotERYTEGmkerlg is an access to your prefix.

1 Like

Hi @Alexey, no I have not updated $ORIGIN… How is this done? I saw a forum post about that when I was reading around earlier but they responded and said they didn’t have to do anything and then never really gave the solution. When I run ./uplink.exe share --dns www.DOMAINNAME.us sj://site/src my $ORIGIN says example.com

Hi @Chad! (Apologies if you already know all of this, but it seemed like the likeliest starting point.) The output from that command- all the $ORIGIN and IN CNAME stuff- is called a zone file. You need to use the information in it to configure the DNS for your domain. How that is done depends entirely on your DNS provider.

Some DNS providers will let you cut and paste your own zone file to control what DNS entries exist in your domain. For others, you need to use some sort of web form to add entries.

In the example @Alexey posted, the owner of DOMAINNAME.us would need to have three DNS entries:

www IN CNAME link.us1.storjshare.io

–meaning that when you look up www.DOMAINNAME.us in DNS, the server should respond saying, in effect, “look up link.us1.storjshare.io instead and use that address”.

txt-www        IN      TXT     storj-root:site/src
txt-www        IN      TXT     storj-access:uitnlehiotERYTEGmkerlg

–meaning that there should be two “TXT” entries under the key txt-www, with those two values. One starts with storj-root: and the other with storj-access:. That lets the storj linkshare server know how to access and decrypt your objects on the Storj network.

If you have all that already, we can diagnose further. It might help to know your actual domain name, so I can check DNS and try it out myself. You could DM that to me if you like.

5 Likes

Hi @thepaul, I’m pretty sure I already have all this as I’m using Epik for my registrar so changing the CNAME and adding two text files is done through a web form. The problem I’m seeing in all these examples is my $ORIGIN isn’t changing. It says example.com no matter what hostname I give the share command. It just says make sure to change the origin.
And I would love to and would have DM’d one of you but don’t think I have the ability.

you’ll have it shortly , if you dont already. deets here Understanding Discourse Trust Levels.

tldr; if youve spent 10 minutes of read time, a bump to trust level 1 happens automatically. its just to prevent behavior like a bot creating account and spamming. the settings are deliberately made as pretty attainable

Get to trust level 1 by…

  • Entering at least 5 topics
  • Reading at least 30 posts
  • Spend a total of 10 minutes reading posts

Users at trust level 1 can…

  • Use all core Discourse functions; all new user restrictions are removed
  • Send PMs
  • Upload images and attachments if enabled
  • Edit wiki posts
  • Flag posts
  • Mute other users

Thanks @jocelyn, I guess I should’ve made an account before deciding I was going to have to post something. And there really aren’t too many forums addressing static websites, and the few there are never really gave their solution or had a different question. One forum asked about updating the $ORIGIN, but never gave the solution besides they had to do something that didn’t involve Storj.

1 Like

When the docs and guides say “update the $ORIGIN”, they just mean you should change “example.com” to your own domain name when you copy and paste that zone file output to your DNS provider. Or, if your DNS provider wants you to upload the zone file, you would save that output in a text file and change the $ORIGIN value there. If you aren’t going to provide these entries to your DNS provider in the form of a zone file, then you don’t need to worry about changing anything. The output from uplink share --dns will always say “example.com”, I think.

What I think you’re still missing is the TXT entries. They don’t seem to be present. If you run the command

nslookup -type=txt txt-www.YOURDOMAIN.us

Then you should see those strings that start with with storj-root: and storj-access: in the output.