-
-
Notifications
You must be signed in to change notification settings - Fork 960
Expand file tree
/
Copy pathCaddyfile
More file actions
39 lines (37 loc) · 1.06 KB
/
Caddyfile
File metadata and controls
39 lines (37 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# To run this make sure you have php zts installed
# In the `php.ini` set output_buffering = Off (or else you may not get the same measures)
# Run `php-fpm -F` (it should default to 127.0.0.1:9000)
# Run `frankenphp start --config Caddyfile` (do not use `run` or printing in the terminal will slow down the server)
# You now have 2 servers:
# - localhost:8080 with PHP FPM
# - localhost:8081 with FrankenPHP
#
# Note that with no worker mode the performances on HTTP Request (sequentially !) will be likely the same.
{
frankenphp
}
localhost:8080 {
header {
Access-Control-Allow-Origin *
Access-Control-Allow-Credentials true
Access-Control-Allow-Methods *
Access-Control-Allow-Headers *
defer
}
root * public/
php_fastcgi 127.0.0.1:9000
file_server
}
localhost:8081 {
header {
Access-Control-Allow-Origin *
Access-Control-Allow-Credentials true
Access-Control-Allow-Methods *
Access-Control-Allow-Headers *
defer
}
root * public/
file_server
log
php_server
}