caddyserver / caddy

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
https://caddyserver.com
Apache License 2.0
58.03k stars 4.03k forks source link

Does Caddy2 support other FastCGI backend besides PHP? #3581

Closed kuri-leo closed 4 years ago

kuri-leo commented 4 years ago

Hi folks,

As I'm pushing my caddyfile from v1 to v2, I find fastcgi path endpoint turned into php_fastcgi. Does this change mean Caddy2 only supports PHP as its UNIX socket backend?

In my project, I prefer to using Caddy2 as my gateway and frontend to host incoming traffic and reverse proxy them through UNIX socket (this can save server's limited local loopback buffer indeed) to different backends(Not PHP yet 🤦‍♂️) with the corresponding path. Is there any possible solution to handle this in Caddy2?

Thanks in advance!

francislavoie commented 4 years ago

Yep! The php_fastcgi directive is simply a shortcut for reverse_proxy with the fastcgi transport mode.

https://caddyserver.com/docs/caddyfile/directives/reverse_proxy

For next time, please ask your usage questions on the Caddy community forums. We prefer to keep the GitHub issue board for bugs and feature requests. Don't forget to fill out the thread template so we can help you!