Getting Isso Working?

I’m trying to get the Isso commenting system working with Caddy and not having much luck.

I took a look at the previous thread here:

https://caddy.community/t/isso-vhost-not-working

and followed the instructions there, but no joy.

Unfortunately the documentation for Isso is extremely lacking when it comes to troubleshooting, so I’m not even sure whether the problem is on the Isso end, the Caddy end, or in the way I’m embedding Isso on my pages.

Things look OK when I start Isso on my server:

(isso) $  ᐅ  isso -c ~/isso/isso.cfg  &
[2] 5497
(isso) $  ᐅ  2017-02-15 19:51:12,115 INFO: connected to https://stiobhart.net/

but I don’t see a comments box on the pages and if i try to access Isso directly on the server [at https://stiobhart.net/isso ] I get:

Bad Request
missing uri query

which may or may not indicate that Isso is working properly. Like I say Isso’s documentation is pretty non-existent when it comes to info as to how to know if things are working properly.

So, heres what I have in my isso.cfg:

; |||||||||||| general settings ||||||||||||||
[general]
;database location, check permissions, automatically created if not exists
dbpath = /xxxxxxx/isso/comments.db
;this needs to match X-Script-Name in Caddyfile header
name = isso
; your website or blog (not the location of Isso!)
host =
    http://stiobhart.net/
    https://stiobhart.net/

;||||||||||| server section ||||||||||
[server]
;listen HTTP or unix socket
listen = http://127.0.0.1:8080/
;listen = unix:///tmp/isso.sock
;reload app when source code changes
reload = off
; show resource consumption after each request
profile = off

... snip ...

and here’s what I’ve got on my web pages:

//in page headers

<script data-isso="//stiobhart.net/isso/" src="//stiobhart.net/isso/js/isso.js"></script>

in page body:

<section id="isso-thread"></section>

and, last but not least, in my Caddyfile:

stiobhart.net {

    	root /var/www/xxxxxxxxx
    	log /www/xxxxxxxx
    	errors /www/xxxxxx
    	#compression on
	gzip

    #Isso Comments
    proxy /isso 127.0.0.1:8080 {
    without /isso
    transparent
    header_upstream X-Script-Name /isso
    }
}

So, if anyone can pick the bones out of that one and let me know where I’m going wrong, I’ll be eternally grateful.

One final thought: I’m not running any kind of additional server [such as uWSGI to handle Python apps. ie. Isso] as the Isso docs say:

Isso ships with a built-in web server, which is useful for the initial setup and may be used in production for low-traffic sites (up to 20 requests per second). Running a “real” WSGI server supports nice things such as UNIX domain sockets, daemonization and solid HTTP handler while being more stable, secure and web-scale than the built-in web server.

which I’m taking to mean, no additional setup is required. But just thought it worth mentioning, in case it DOES matter, when setting up Caddy to proxy Python apps.

I’ve only ever gotten it working running isso in a docker container and forwarding to that.

Well, I have the scent of victory in my delicately flared nostrils. I’ve managed to get the fecker working!

I thought I’d try and narrow the cause down a bit first. So I stopped Caddy and restarted Nginx on my server [luckily everything Nginx was still setup there, as I’d been using Nginx up until a few months ago, when I switched to Caddy.

I still got the same errors and lack of comment embedding with Nginx, as I did with Caddy. So that, at least let me know that my Isso setup was the likely culprit.

[I don’t know why I never thought of this before, but…]

Given Isso is embedded via JavaScript on the client, I opened up my browser Dev Tools and took a look at the Javascript console:

It was immediately obvious that the browser was trying to load the Isso JavaScript at /isso/js/isso.js whereas re-consulting the documentation showed me that the Isso app actually serves up a minified version of the Javascript at /isso/js/embed.min.js

and, lo’ and behold, there was the Isso Javascript being duly served at that URL:

So the remedy was a simple edit to the script embed code in my page headers. From:

//in page headers

<script data-isso="//stiobhart.net/isso/" src="//stiobhart.net/isso/js/isso.js"></script>

to:

//in page headers

<script data-isso="//stiobhart.net/isso/" src="//stiobhart.net/isso/js/embed.min.js"></script>

…and a quick reboot of Isso and Hey Presto! I had comments.

This was still running under Nginx so, with fingers crossed, I stopped Nginx, restarted Caddy and everything still worked.

So the moral of the story is “Be careful when you try random solutions offered online”. I don’t know where the Hell I got the code snippet from that tried to include the Isso Javascript s isso.js instead of embed.min.js, but that was obviously what sent everything pear-shaped.

Having solved the problem, I also realise that it wasn’t directly concerned with Caddy at all. But I’ll leave my solution here, just in case anyone else is struggling with the same thing. If nothing else, at least it proves it is possible to get Isso running under Caddy!

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.