Need tutorial for Nginx/PHP-FPM users #417
Replies: 5 comments 3 replies
-
I would also suggest some documentation about moving from Apache/Litespeed To Caddy/Frankenphp. |
Beta Was this translation helpful? Give feedback.
-
I think most of these questions can be answered by playing around with Caddy on its own first to figure out how it usually works - to me at least it reads more like being new to Caddy more than FrankenPHP itself.
This one I'm not sure on. The answer to this would likely also relate to the port conflict question - if multiple Caddy instances are trying to use the same port then yeah you'll probably have issues. But if it's a single Caddy instance then it's the same as nginx serving multiple site configs. |
Beta Was this translation helpful? Give feedback.
-
Welp all good questions, but no clear answer yet. I guess only way to find out is experiment a lot. Which is really bad to do |
Beta Was this translation helpful? Give feedback.
-
I'm also interested. It looks perfect to use in containers, but for a "normal" setup (caddy installed with apt + php-fpm) how to replace caddy with Frankenphp ? Is it only possible ? |
Beta Was this translation helpful? Give feedback.
-
Ok got it. Just need to use Frankenphp binary globally instead of Caddy, add the "frankenphp" and "php_server" directives in the Caddy config files, and start Frankenphp like Caddy with --config . |
Beta Was this translation helpful? Give feedback.
-
I'm interested in Franken PHP. Read the news, docs... but still confused about how to config it to migrate from Nginx/PHP-FPM.
Apart from benefit, most of the examples show it run one single application, just like
php artisan serve
.In my case, I have multiple websites on a VPS, NOT using Docker (I'm not sure to call my setup as "bare metal", because from what I understand it may refer to a physical server, but in my case it's VPS). With Nginx, I forward each domain to a PHP-FPM socket. Each PHP-FPM socket run it own linux user (web1_user, web2_user...) (pooling) and my app is chown to that user, to prevent local exploit if one is compromised.
I read article about Roadrunner, Swoole and Franken PHP, seem like there's a new term (to me) called "application server". To my understanding as of now, it mean that one server serve one application, separately. It make me wonder whether it will make conflict in the PORT using. I'm not sure if using Docker can solve it, but I'm not into using Docker in my case. So every app must config a separate port? How to config domain to point to each app? Does FrankenPHP run on shared linux user, or can I config each app running on separate linux user like PHP-FPM pooling above?
Each web app run its own FrankenPHP instance, does it mean that I have several Caddy webserver instances running? Does it create more overhead in compare with one single Nginx service?
Another point is WAF. With Nginx, I have Mod_Security. I know Caddy have Coraza, but there're only tutorial for config Caddy with Coraza, not the Franken PHP itself. From what I read, Franken PHP has Caddy under its hood, but how to config Franken PHP's Caddy? The configuration is same with plain/stand alone Caddy or not?
If the Franken PHP documentation has the Production Deployment with these explaination for Nginx/PHP-FPM user like me, it will smooth the transition alot.
Beta Was this translation helpful? Give feedback.
All reactions