You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: drop redundant Caddyfile/Dockerfile filename comments
Per review feedback, a bare `# Caddyfile` or `# Dockerfile` on the first
line of a `caddyfile` or `dockerfile` fenced block restates information
the language tag already carries and just adds noise. Remove those
generic headers and keep only the comments that name a specific file
(e.g. `# compose.yaml`, `# static-build.Dockerfile`, `// public/index.php`)
or describe the block's purpose.
Copy file name to clipboardExpand all lines: docs/config.md
-14Lines changed: 0 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,6 @@ You can specify a custom path with the `-c` or `--config` option.
14
14
A minimal `Caddyfile` to serve a PHP application is shown below:
15
15
16
16
```caddyfile
17
-
# Caddyfile
18
17
# The hostname to respond to
19
18
localhost
20
19
@@ -45,7 +44,6 @@ PHP:
45
44
- You should copy an official template provided by the PHP project:
46
45
47
46
```dockerfile
48
-
# Dockerfile
49
47
FROM dunglas/frankenphp
50
48
51
49
# Production:
@@ -87,7 +85,6 @@ The `php_server` or the `php` [HTTP directives](https://caddyserver.com/docs/cad
87
85
Minimal example:
88
86
89
87
```caddyfile
90
-
# Caddyfile
91
88
localhost {
92
89
# Enable compression (optional)
93
90
encode zstd br gzip
@@ -99,7 +96,6 @@ localhost {
99
96
You can also explicitly configure FrankenPHP using the [global option](https://caddyserver.com/docs/caddyfile/concepts#global-options)`frankenphp`:
100
97
101
98
```caddyfile
102
-
# Caddyfile
103
99
{
104
100
frankenphp {
105
101
num_threads <num_threads> # Sets the number of PHP threads to start. Default: 2x the number of available CPUs.
@@ -125,7 +121,6 @@ You can also explicitly configure FrankenPHP using the [global option](https://c
125
121
Alternatively, you may use the one-line short form of the `worker` option:
126
122
127
123
```caddyfile
128
-
# Caddyfile
129
124
{
130
125
frankenphp {
131
126
worker <file> <num>
@@ -138,7 +133,6 @@ Alternatively, you may use the one-line short form of the `worker` option:
138
133
You can also define multiple workers if you serve multiple apps on the same server:
139
134
140
135
```caddyfile
141
-
# Caddyfile
142
136
app.example.com {
143
137
root /path/to/app/public
144
138
php_server {
@@ -166,7 +160,6 @@ it's a PHP file or not. Read more about it in the [performance page](performance
166
160
Using the `php_server` directive is equivalent to this configuration:
167
161
168
162
```caddyfile
169
-
# Caddyfile
170
163
route {
171
164
# Add trailing slash for directory requests
172
165
@canonicalPath {
@@ -190,7 +183,6 @@ route {
190
183
The `php_server` and the `php` directives have the following options:
191
184
192
185
```caddyfile
193
-
# Caddyfile
194
186
php_server [<matcher>] {
195
187
root <directory> # Sets the root folder to the site. Default: `root` directive.
196
188
split_path <delim...> # Sets the substrings for splitting the URI into two parts. The first matching substring will be used to split the "path info" from the path. The first piece is suffixed with the matching substring and will be assumed as the actual resource (CGI script) name. The second piece will be set to PATH_INFO for the script to use. Default: `.php`
@@ -218,7 +210,6 @@ Workers can instead be restarted on file changes via the `watch` directive.
218
210
This is useful for development environments.
219
211
220
212
```caddyfile
221
-
# Caddyfile
222
213
{
223
214
frankenphp {
224
215
worker {
@@ -237,7 +228,6 @@ where the FrankenPHP process was started. You can instead also specify one or mo
Copy file name to clipboardExpand all lines: docs/symfony.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,6 @@ Hot reloading is enabled by default in [Symfony Docker](https://github.com/dungl
71
71
To use the [hot reload](hot-reload.md) feature without Symfony Docker, enable [Mercure](mercure.md) and add the `hot_reload` sub-directive to the `php_server` directive in your `Caddyfile`:
Copy file name to clipboardExpand all lines: docs/wordpress.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,6 @@ Run [WordPress](https://wordpress.org/) with FrankenPHP to enjoy a modern, high-
23
23
For a production-ready setup, prefer using `frankenphp run` with a `Caddyfile` like this one:
24
24
25
25
```caddyfile
26
-
# Caddyfile
27
26
example.com
28
27
29
28
php_server
@@ -36,7 +35,6 @@ log
36
35
To use the [hot reload](hot-reload.md) feature with WordPress, enable [Mercure](mercure.md) and add the `hot_reload` sub-directive to the `php_server` directive in your `Caddyfile`:
0 commit comments