Librespeed and php-fpm Q

Caddy version 1.0.4-3

a. System environment:

Arch linux, systemd

c. Service/unit/compose file:

[Unit]
Description=Caddy HTTP/2 web server
Documentation=https://caddyserver.com/docs
After=network.target

[Service]
User=http
Group=http
Environment=CADDYPATH=/var/lib/caddy
EnvironmentFile=-/etc/caddy/envfile
ExecStart=/usr/bin/caddy -log stdout -agree -conf /etc/caddy/caddy.conf -root /tmp
ExecReload=/usr/bin/kill -USR1 $MAINPID
LimitNOFILE=1048576
LimitNPROC=64
PrivateTmp=true
PrivateDevices=true
ProtectHome=true
ProtectSystem=strict
ReadWriteDirectories=/var/lib/caddy
ReadWriteDirectories=/var/log/caddy
ReadWriteDirectories=/run
AmbientCapabilities=CAP_NET_BIND_SERVICE

[Install]
WantedBy=multi-user.target

d. My complete Caddyfile:

speedtest.wrtpoona.in {
    root /var/cache/librespeed
    fastcgi / 127.0.0.1:9000 php
#        fastcgi / /run/php-fpm/php-fpm.sock php {
#            ext .php
#            split .php
#        }
#    log / /var/log/caddy/speedtest_combined.log "{combined}"
    errors /var/log/caddy/speedtest_errors.log
    tls str@hotmail.com
}

3. The problem I’m having:

Caddy works with fastcgi / 127.0.0.1:9000 php but is buggy with fastcgi / /run/php-fpm/php-fpm.sock php as shown commented out above.

4. Error messages and/or full log output:

There are no errors in the log, but some things will not work, like the gauge for Download speed or the ISP information bits. See https://speedtest.wrtpoona.in for an example.
Project: GitHub - librespeed/speedtest: Self-hosted Speedtest for HTML5 and more. Easy setup, examples, configurable, mobile friendly. Supports PHP, Node, Multiple servers, and more

I assume fastcgi / /run/php-fpm/php-fpm.sock php would be faster being a local socket and would like to get caddy to use that. I would appreciate any pointers.

Is the user http present, ist the php-fpm user also http?

Yes, and yes. I did go through troubleshooting php-fpm.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.