Using a seperate webserver and a applicationserver with php applications

1. Output of caddy version:

na

2. How I run Caddy:

Run as a service.

a. System environment:

Ubuntu 22.04.1 Caddy v2.5.2

b. Command:

Paste command here.
service caddy start

c. Service/unit/compose file:

For my question not NA.

Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane. -->

d. My complete Caddy config:

Not yet made. Because I don’ t know if it is possible.

Paste your config here, replacing this text.
Use `caddy fmt` to make it readable.
DO NOT REDACT anything except credentials.
LEAVE DOMAIN NAMES INTACT.
Make sure the backticks stay on their own lines.

3. The problem I’m having:

I have 2 computers. The first runs caddy as a webserver. The other one is the application server with php applications. My question is, is it possible to use/connect/start the php applications on the application server from the caddy webserver without using reverse_proxy but perhaps using the command file_server? If there is a solution, where perhaps can I find a example.

4. Error messages and/or full log output:

NA

Paste logs/commands/output here.
USE THE PREVIEW PANE TO MAKE SURE IT LOOKS NICELY FORMATTED.

5. What I already tried:

I looked at the php_fastcgi documentation but I couldn’t find any answers.

6. Links to relevant resources:

NA

Please can you full fill the requested information’s from 1-5, thank you

Yes you can delegate running PHP to another machine, but you must have the files accessible to both Caddy and PHP, since they both need to read the files. Caddy needs them to serve static files and to perform URL rewrites based on whether files exist on disk before sending it to PHP, and PHP needs them to actually run the PHP code.

This topic was automatically closed after 30 days. New replies are no longer allowed.