Nichlas
(Nichlas Hummelsberger)
1
I’m trying to get Caddy and PHP7 to work. (PHP7 seems to be the only one available on Ubuntu 16.04 LTS.)
But it simply won’t work. Nothing is returned when trying to access a php page (e.x. a phpinfo page).
(Caddy itself works great. I tried a simple markdown page and it worked fine.)
I’ve checked and double-checked all the config files that I’m aware of.
This is my Caddyfile
photos.<domain> {
root /var/www/photos.<domain>
fastcgi / /var/run/php/php7.0-fpm.sock php
}
This is my /etc/php/7.0/fpm/pool.d/www.conf
file
[www]
user = www-data
group = www-data
listen = /run/php/php7.0-fpm.sock
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
johan
(Johan Dorland)
2
Just some wild guesses.
Guess #1
Your caddyfile refences /var/run/php/php7.0-fpm.sock
, but the php-fpm config has /run/php/php7.0-fpm.sock
On my Fedora machine /var/run
symlinks to /run
, but does Ubuntu also do this?
Guess #2
Does caddy run as www-data
?
abiosoft
(Abiola Ibrahim)
4
Enable error log and check what error you are getting.
errors /path/to/error.log
Nichlas
(Nichlas Hummelsberger)
5
Turns out the issue wasn’t with Caddy. php.ini was set not to show any errors and php-errors in the page caused it to return no result.
system
(system)
Closed
6
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.