On Write Freely, writing first post errors out

writefreely

#1

OK, so because this is an alpha project, I’m gonna try and be as verbose as possible.

I can’t submit new posts. The error I get on hitting the submit button is a 401. I’ve tried logging out and back in again, but that doesn’t help.

I just set up a Write Freely instance. It’s set as single-user. I have it running behind Caddy, not nginx. My Caddyfile is this:

blog.ironarachne.com {
  tls ben@ironarachne.com
  proxy / localhost:8183
}

In this context, I’ve customized Write Freely to run on port 8183. It’s running under systemd. Here is my unit file:

[Unit]
Description=Write Freely service
After=network.target

[Service]
Type=simple
User=www-data
WorkingDirectory=/srv/writefreely
ExecStart=/srv/writefreely/writefreely
Restart=on-failure

[Install]
WantedBy=multi-user.target

I imagine this is an artifact of not doing the prescribed way. Happy to help get to the root cause.


#2

Hmm, so first, are there any extra errors in your server logs (i.e. the logs that writefreely outputs)?

If not:

  • What’s your [app] section look like in config.ini?
  • Did you switch between multi- and single-user mode?
  • Are you publishing a draft or blog post?
  • If blog post: if you run the query SELECT owner_id FROM collections WHERE id = 1; is the result 1?

#3

See the answer to my question on Caddy.Community.


#4

So that Caddy config worked out, right? If so, I’d like to add it to the docs for everyone else.


#5

It works perfect. Using 0.2.1 now too, and I can post, yay!


#6

Awesome! :tada:


#7

The changes to the Caddy configuration fixed this problem.