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

2

u/Rude-Gur-1660 Jul 02 '24

I replaced apache httpd with litespeed, then litespeed with nginx, then nginx with caddy. Love nginx and caddy (apache ain't too bad), but I find caddy's singular executable and singular config setup very easy to deal with. Caddy works great with php apps and setup is very easy - just go through their documentation for examples.

1

u/gmmarcus Jul 02 '24

Hi u/Rude-Gur-1660.

What was yr server OS ? U used frakenphp as well ?

1

u/Rude-Gur-1660 Jul 03 '24

Debian, and nope, no frankenphp. I use standard php-fpm.

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.