Skip Navigation

Switching from Apache to Caddy: how to use php-fpm?

Hi, some bot for some reason really needs to scrape my wordpress blog over and over again, overheating my poor celeron.

For laziness I am just using the default wordpress docker image, which is php+apache.

I did some experiments and with php-fpm+caddy it's much faster.

Now i want to migrate all my wordpress blogs, five in total and I want to manage them from a single caddy instance.

php-fpm needs to be mounted in the same path or it can be different?

For example, the wordpress install places the files in /var/www/html, and so for Caddy I mount in the same path and in the Caddyfile i have:

test.example.com{
        root * /var/www/html
        php_fastcgi wordpress:9000
        file_server
}

if i have multiple installs can I mount different paths like /var/www/html2 and so on (but only on caddy) or it must match both containers?

3

You're viewing a single thread.

3 comments