Skip to content

Commit 208087f

Browse files
committed
simplify example project
1 parent a6c0f74 commit 208087f

File tree

6 files changed

+16
-63
lines changed

6 files changed

+16
-63
lines changed

package/Caddyfile

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,17 @@
33
# https://frankenphp.dev/docs/config
44
# https://caddyserver.com/docs/caddyfile
55
{
6-
{$CADDY_GLOBAL_OPTIONS}
7-
8-
frankenphp {
9-
worker /usr/share/frankenphp/public/index.php
10-
{$FRANKENPHP_CONFIG}
11-
}
6+
frankenphp
127
}
138

14-
{$CADDY_EXTRA_CONFIG}
15-
16-
{$SERVER_NAME:localhost} {
17-
#log {
18-
# # Redact the authorization query parameter that can be set by Mercure
19-
# format filter {
20-
# request>uri query {
21-
# replace authorization REDACTED
22-
# }
23-
# }
24-
#}
25-
26-
root /usr/share/frankenphp/public/
9+
localhost {
10+
root /usr/share/frankenphp/
2711
encode zstd br gzip
2812

29-
# Uncomment the following lines to enable Mercure and Vulcain modules
30-
#mercure {
31-
# # Transport to use (default to Bolt)
32-
# transport bolt {
33-
# mercure.db
34-
# }
35-
# # Publisher JWT key
36-
# publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG}
37-
# # Subscriber JWT key
38-
# subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG}
39-
# # Allow anonymous subscribers (double-check that it's what you want)
40-
# anonymous
41-
# # Enable the subscription API (double-check that it's what you want)
42-
# subscriptions
43-
# # Extra directives
44-
# {$MERCURE_EXTRA_DIRECTIVES}
45-
#}
46-
#vulcain
47-
48-
{$CADDY_SERVER_EXTRA_DIRECTIVES}
49-
5013
php_server
5114
}
15+
16+
# As an alternative to editing the above site block, you can add your own site
17+
# block files in the Caddyfile.d directory, and they will be included as long
18+
# as they use the .caddyfile extension.
19+
import Caddyfile.d/*.caddyfile
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
<?php
2-
$requestCount = $i ?? 0;
3-
$requestTime = $duration ?? 0;
4-
?>
5-
61
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
72

83
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
@@ -122,13 +117,16 @@
122117
<p>Configuration is handled in your <code>Caddyfile</code>. Make sure your <code>root</code> and <code>php_server</code> directives are properly set for your site.</p>
123118

124119
<div class="runtime-info">
125-
<strong>Requests handled:</strong> <?php echo htmlspecialchars($requestCount); ?><br />
126-
<strong>Last request time:</strong> <?php echo $requestTime; ?> microseconds
120+
<strong>Served by PHP SAPI: </strong> <?php echo php_sapi_name() ?><br />
127121
</div>
128122

129123
<div class="logos">
130-
<a href="https://frankenphp.dev/"><img src="assets/frankenphp.png" height="50" width="166" alt="[ Powered by FrankenPHP ]" /></a>
131-
<a href="https://caddyserver.com/"><img src="assets/caddy.png" height="50" width="166" alt="[ Powered by Caddy ]" /></a>
124+
<a href="https://frankenphp.dev/">
125+
<img src="assets/frankenphp.svg" height="50" width="166" alt="[ Powered by FrankenPHP ]" />
126+
</a>
127+
<a href="https://caddyserver.com/">
128+
<img src="assets/caddy.png" height="50" width="166" alt="[ Powered by Caddy ]" />
129+
</a>
132130
</div>
133131
</div>
134132
</div>
-176 KB
Binary file not shown.

package/content/public/index.php

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)