ndarilek / hugo-sandstorm

6 stars 5 forks source link

Unable to set up domain to point to public hugo grain #7

Closed ShauneDonohue closed 7 years ago

ShauneDonohue commented 7 years ago

I setup a grain and was able to create a site without much trouble, thanks for that love what you have done here. When I try and setup a cleaner URL like www.example.com It does not work. I updated the DNS records with the appropriate CNAME and TXT records but when I go to the new URL all I get is "No such grain for public ID: www [404]". If it matters I do not have SandStorm running on the root site but as a sub-domain of sandstorm.example.com, in case it is not obvious example.com is not my domain :)

Any thoughts on what might be wrong?

DNS A Record | * | xxx.xxx.xxx.xxx A Record | @ | xxx.xxx.xxx.xxx CNAME Record | www | 9apnxh1f948uxmmtinuu.sandstorm.example.com. TXT Record | sandstorm-www.www | 9apnxh1f948uxmmtinuu

sandstorm.conf BASE_URL=https://sandstorm.example.com WILDCARD_HOST=*.example.com

dig TXT sandstorm-www.www.example.com ; <<>> DiG 9.9.5-3ubuntu0.15-Ubuntu <<>> TXT sandstorm-www.www.example.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20261 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1280 ;; QUESTION SECTION: ;sandstorm-www.www.example.com. IN TXT

;; ANSWER SECTION: sandstorm-www.www.example.com. 1799 IN TXT "9apnxh1f948uxmmtinuu"

;; Query time: 18 msec ;; SERVER: xxx.xx.xxx.xxx#53(xxx.xxx.xxx.xx) ;; WHEN: Mon Aug 14 13:08:56 UTC 2017 ;; MSG SIZE rcvd: 90

ocdtrekkie commented 7 years ago

I don't know a lot about DNS personally, but I am wondering if this either revolves around trying to publish to a subdomain of your Sandstorm's wildcard host (which I haven't done), or if there's maybe some sort of special-casing on your server affecting www (since most websites redirect www to the root).

Your actual CNAME and TXT records look like I'd personally expect them to look.

ocdtrekkie commented 7 years ago

I want to say your error message of "No such grain for public ID" means it's figured out you're trying to access a grain's static publishing, but it isn't seeing the right grain.

ShauneDonohue commented 7 years ago

I originally started with Sandstorm being at the root and tried moving it to sub domain to get this working. Ok I can try over at sandstorm and see what they say but I thought I would start here.

ocdtrekkie commented 7 years ago

You are likely to get more responses on the Sandstorm dev list than here. https://groups.google.com/forum/#!forum/sandstorm-dev

This is definitely a Sandstorm configuration question more than a Hugo-specific question.

ShauneDonohue commented 7 years ago

Oh I opened and issue over at https://github.com/sandstorm-io/sandstorm/issues/2971. If I dont get a response there I will hit up the Google Group. Thank you.