Skip to content

Commit

Permalink
Add Caddy and FrankenPHP Configurations to ExternalWebserversSQL.md (#90
Browse files Browse the repository at this point in the history
)

* Update ExternalWebserversSQL.md

Add examples for Caddy

* Update wiki/webserver/ExternalWebserversSQL.md

Co-authored-by: Wired Rose <[email protected]>

* Update wiki/webserver/ExternalWebserversSQL.md

Co-authored-by: Wired Rose <[email protected]>

* Update config for FrankenPHP

Co-authored-by: CodingWithAnxiety <[email protected]>

* Fix missing bracket in ExternalWebserversSQL.md

* Update ExternalWebserversSQL.md

* Remove caddy code-language

(since it breaks wiki formatting unfortunately)

* Update ExternalWebserversSQL.md

---------

Co-authored-by: Wired Rose <[email protected]>
Co-authored-by: CodingWithAnxiety <[email protected]>
Co-authored-by: Lukas Rieger <[email protected]>
  • Loading branch information
4 people authored Sep 1, 2024
1 parent 47331ac commit 0a60bfc
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions wiki/webserver/ExternalWebserversSQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,68 @@ 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:
```
yourdomain.com {
# The root for the webserver.
root /var/www
file_server
# https://caddyserver.com/docs/caddyfile/patterns#php-fpm
# You may need to modify this path.
php_fastcgi unix//run/php/php7.4-fpm.sock
# Use the sql.php script, which handles requests with data from the sql-server.
handle {
try_files {path} /sql.php
}
# OPTIONAL:
# Proxy requests for live data to the bluemaps integrated webserver.
# If you have multiple servers you will need to proxy each map-id to the correct server.
handle /maps/*/live/* {
reverse_proxy 127.0.0.1:8100
}
}
```
> **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:
```
{
# https://frankenphp.dev/docs/config/#caddyfile-config
# Enable FrankenPHP.
frankenphp
}
yourdomain.com {
# The root for the webserver.
root /var/www
# https://frankenphp.dev/docs/config/
# Execute PHP files in the root directory and serve assets.
php_server
# Use the sql.php script, which handles requests with data from the sql-server.
handle {
try_files {path} /sql.php
}
# OPTIONAL:
# Proxy requests for live data to the bluemaps integrated webserver.
# If you have multiple servers you will need to proxy each map-id to the correct server.
handle /maps/*/live/* {
reverse_proxy 127.0.0.1:8100
}
}
```
> **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 }

0 comments on commit 0a60bfc

Please sign in to comment.