Naming Outlines And Sites

The remaining piece of the puzzle to moving to my own fargoPublisher server is getting the blog site to publish to a URL that is more friendly than the directory structure that fargoPublisher publishes to.

As currently exists, fargoPublisher writes content to [bucket name]/users/[outline name] and therefore, rather than being able to access a site at example.com, you have to enter example.com/users/test.

From how things work with the "default" pub.fargo.io configuration, it looks like the outline name should be the host name part of the fargoPublisher server and redirects automatically to the S3 bucket, but doesn't seem to work regardless of whether fpRedirect is true or false.

Here is an example:

  • URL pointing to S3 bucket: blog.frankmcpherson.org

  • URL pointing to my fargoPublisher server: frankmcpherson.net

  • An outline named sports is published to blog.frankmcpherson.org/users/sports/

Right now, to access the site I have to enter blog.frankmcpherson.org/users/sports/ but what I want, and what Fargo appears to expect, is to be able to access the site by via sports.frankmcpherson.net, but so far I have not found a way to make fargoPublisher redirect to the AWS bucket.

  • In other words, when someone enters sports.frankmcpherson.net, the server hosting fargoPublisher would seamlessly redirect to blog.frankmcpherson.org/users/sports/.

I did find a work around, but it is a little costly and I would need to figure out how to automate it to make it work. I created a S3 bucket named sports.frankmcpherson.net. (By creating a CNAME that points to that S3 bucket) and configured it to host a static web site. Next, I manually copied the contents of blog.frankmcpherson.org/users/sports to sports.frankmcpherson.net. After I manually made this change, all of the navigation and the Fargo buttons work as expected.

If I were to keep the workaround in place, that means I need to have two copies of my blog content on S3, and I need an automated way for keeping the buckets in sync.

Another note... the issue is caused by Fargo's support for publishing multiple blogs. I could configure fargoPublisher to write content to the root of the S3 bucket but that would mean that I could only write & publish one blog with Fargo as opposed to writing and publishing multiple blogs.

A thought... if there was a way to override fpHostingPath with a directive one could tell fargoPublisher to publish content for an outline to a specific S3 bucket to which I point to using a CNAME of the fpDomain. It means I would need to create a bucket for each blog, which I am willing to manually do (essentially each such S3 bucket is a web server hosting a blog), but it would mean that I would only need one copy of the content in S3.

UPDATE:

  • I figured out the problem. In order for Fargo Publisher to properly direct content on the S3 bucket it MUST be listening on Port 80. The instructions I was following directed me to configure it for port 8080. Once I got publisher.js listening on port 80, everything worked as expected. Getting publisher.js top listen on port 80 on my server required running it under a different user id than the one that I was using.

Last built: Wed, Feb 17, 2016 at 3:27 PM

By Frank McPherson, Tuesday, July 15, 2014 at 9:13 PM. So, it has come to this.