Sorry, I forget to include that I am running this on Cent OS 7. I removed PHP manually, then installed the IUS community repo for PHP-7, updated and installed all PHP modules.
And I adjusted the caddyfile. not the Caddy.service. My mistake.
I adjusted line 5 from fastcgi / 127.0.0.1:9000 php to fastcgi / /run/php/php7.0-fpm.sock php in the caddyfile.
The last thing I thought I needed was to redirect PHP-7 to use Caddy, instead of the standard php used Apache or HTTPD. I usually did this by going to the www.conf document in found in /etc/php-fpm.d/www.conf
If this helps any, this is the reference material I used when setting up my application on Cent OS 7
Can you tell me what errors you get when you try to access your site in this configuration?
I believe the correct usage should be fasticgi / unix:/run/php/php7.0-fpm.sock php (note the unix:, which denotes a unix socket as the resource scheme).
If you yum remove package and yum install package, it should tell you which config files it isn’t overwriting and what it’s saving them as. Reinstall php, find out where it saves the new www.conf, and copy it over your current one.
So I uninstalled PHP and then Re-installed it. The same files were there, which leads me to believe I am not uninstalling it properly. Both were empty. I am uninstalling using
Unfortunately I don’t have experience with php7 on CentOS to advise you further. Usually I’m on a distro from the Debian family, or deploying to mostly-system-agnostic Docker containers.
My last thought would be to try copying the www.conf you had from your php5 installation. Other than that, you might have to hope someone else here has experience with it, or try a more CentOS- or PHP-specific forum.
I really do appreciate the help though! I’ll continue with my trial & error. I’m sure I’m just overlooking something simple.
But your advice on the Caddyfile really helped me. If I did find the www.conf file and adjusted it, I wouldn’t have had fastcgi loaded properly in my caddyfile.
Your php config is on /etc/php/fpm/pool.d/www.conf. www.conf should not be empty, if it is then something is wrong! Open www.conf and edit these below variable.
Okay. I figured it all out. I was missing a few packages required to run php-fpm in my instance. After removing all php packages, I compiled this command and got www.conf to load properly and changed the users to serve caddy.
I needed to clear caching and adjust the caddy.file to the original one I had in place. Everything works, except my HTTPS certificate is no longer active. It was set to renew in a few weeks. Any thoughts?
Thank you very much for the help BTW. I am learning the in’s & out’s of ssh and to know that I was able to get things in working order, for the most part, is astonishing to me. Thank you guys.