Isso VHost not working

I have this working Nginx configuration in my NixOS config:

  services.nginx = {
    enable = true;
    httpConfig = ''
      server {
        location / {
          return 404;
        location /static/js/ {
          alias ${pkgs.isso.js}/;
        location /isso {
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header X-Script-Name /isso;
          proxy_set_header Host $host;
          proxy_set_header X-Forwarded-Proto $scheme;
          proxy_pass http://localhost:9001;

I tried to convert this to Caddy but it seams that the proxy VHost don’t work correctly. When i post a comment to Isso, i get a 404 response. Empty error log.

  # Caddy Webserver
  services.caddy = {
    enable = true;
    email = "**********";
    ca = "";
    agree = true;
    config = ''
    import /var/www/*/web/Caddyfile {
      tls off
      root ${pkgs.isso.js}/
    } {
      proxy /isso localhost:9001 {
        header_upstream X-Script-Name /isso
      errors /var/www/davidak/log/isso

Any idea what could be wrong?

A suggestion to combine this to one VHost? There is no location directive in Caddy.

Assuming you’re using a mostly-stock isso, you’ll want to include the following additional line in your proxy stanza:

without /isso

Otherwise, the proxied URI becomes localhost:9001/isso/…, which probably isn’t what you want.


These are the URLs that get’s requested by the embedded comments widget:

They get a 200 response to the GET and OPTIONS requests.

The POST request to this URL get’s a 404 response:

So the URLs are correct but i think it’s a caddy issue since it works with nginx.

In my case, isso and Caddy are playing nicely together.

Redacted isso.cfg:

dbpath = /var/lib/isso/comments.db
name = isso # needs to match X-Script-Name in header
host = http://<myhost>/
max-age = 15m
notify = smtp
log-file =

enabled = true
purge-after = 30d

listen =

username = isso
password = <redacted>
host = localhost
port = 587
security = starttls
to = <my e-mail>
from = "isso comments" <source_addr>
timeout = 10

Relevant part of my Caddyfile:

<myhost> {
    proxy /isso {
        without /isso
        header_upstream X-Script-Name /isso # needs to match name in isso.cfg


1 Like

It works after i added it to the VHost of my website instead of a dedicated VHost and added this line:

without /isso

Also added to example repo: add Isso config example by davidak · Pull Request #21 · caddyserver/examples · GitHub


1 Like

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