Lychee photo-management-system on Caddy?


(Martin Hennrich) #1

Hi,
I would like to install Lychee. It is a gallery for photos. This will be my first Caddy site. I used Apache before. Does Caddy support it? How would a minimal Caddyfile look like?

Lychee requires:
PHP 5.5 or 7 (needed extensions are session, exif, mbstring, gd, mysqli, json, zip)
MySQL or MariaDB

My Caddyfile just has the domain in it. I uploaded the Lychee files + Caddyfile via SFTP and the site is loading. SSL is working too. But the screen stays black and I see the message Server error or API not found..

Does anyone have an idea?


(Matthew Fay) #2

Hi @MartinHennrich,

For a PHP site with a database, the working parts Caddy is concerned with are the site files and the PHP gateway.

Assuming a default PHP setup with FPM listening on port 9000, a simple Caddyfile looks like this:

example.com
root /path/to/website
fastcgi / 127.0.0.1:9009 php

You might then want to add gzip, security headers, etc. at your leisure.


(system) #3

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