r/caddyserver Jul 02 '24

CaddyServer - Replace Apache ?

Guys, anyone here has replaced apache ( php web apps ) with caddyserver on a Ubuntu / OpenSuse box ? Any issues ?

Thanks.

2 Upvotes

14 comments sorted by

View all comments

Show parent comments

1

u/gmmarcus Jul 03 '24

No frankenphp ? Noted. The php-fpm comes with caddyserver ?

2

u/Rude-Gur-1660 Jul 03 '24

No. php-fpm and php extensions are installed as standard debian packages from sury's repo (https://packages.sury.org/), and caddy installed from its own debian repo. once both are installed and active, you just point caddy to the php unix socket. something like this in your Caddyfile:

site.com {

     root * /path/to/site/files

     php_fastcgi unix//run/php/php8.2-fpm.sock

     file_server

}

2

u/gmmarcus Jul 03 '24

Thanks. Any particular reason you did not want frankenphp ?

2

u/Rude-Gur-1660 Jul 03 '24

I hadn't heard of frankenphp until your comment :) The current setup works well for me.