Skip to content

Add Caddy and FrankenPHP Configurations to ExternalWebserversSQL.md #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 1, 2024
42 changes: 42 additions & 0 deletions wiki/webserver/ExternalWebserversSQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,45 @@ ProxyPassMatch ^/(maps/[^/]*/live/.*) http://127.0.0.1:8100/$1
> **Important:**<br>
> The above config is **just an example** and not a complete config you can just copy&paste. You **will** need to adapt it to your setup!
{: .info .important }

## Caddy with php-fpm

Here is an example for how it could look like on Caddy with php-fpm:
```caddy
# Replace this with your own domain.
# Put http://example.com if you are behind a reverse proxy, that way Caddy will not try to process HTTPS
example.com {
root * /home/container/public
# https://caddyserver.com/docs/caddyfile/patterns#php-fpm
php_fastcgi unix//run/php/php7.4-fpm.sock # May need to be changed
file_server
# Rewrite requests to sql.php
try_files {path} /sql.php
}
```
> **Important:**<br>
> The above config is **just an example** and not a complete config you can just copy&paste. You **will** need to adapt it to your setup!
{: .info .important }

## FrankenPHP

Here is an example for how it could look like on FrankenPHP:
```caddy
{
# https://caddyserver.com/docs/caddyfile/patterns#frankenphp
frankenphp
order php_server before file_server
}
# Replace this with your own domain.
# Put http://example.com if you are behind a reverse proxy, that way Caddy will not try to process HTTPS
example.com {
root * /home/container/public
file_server
php_server
# Rewrite requests to sql.php
try_files {path} /sql.php
}
```
> **Important:**<br>
> The above config is **just an example** and not a complete config you can just copy&paste. You **will** need to adapt it to your setup!
{: .info .important }