I am not fluent with Linux, as it’s many years since I used it in earnest. But when I wanted to set up a new server running Centos v8 and install Caddy in it, I had a problem.
First I tested my installation from the terminal, and everything worked fine. Then I followed the instructions on the install page, and nothing worked - the service status complained that various files and directories couldn’t be accessed. I double checked all the permissions, and Googled for other instances of this problem, but nothing came up.
Then I took a break to install php v7.4. The page of instructions I found included mention of SELinux, which I’d never heard of, and which no installation instructions I’d found mentioned either; they suggested changing it to permissive mode, and the symptoms they described were exactly those I had. SELinux is enabled in its strictest mode by default in Centos 8.
So I turned off SELinux, and everything worked perfectly. Now, if I want, I can learn how to configure it properly at my leisure.
Well, I may simply be ignorant, but I’m surprised that there is no mention of this in the instructions - even a note saying to check for it would have saved me a lot of time and trouble.
Now that I know this, I have found a forum thread which I didn’t find before (not knowing to search for SELinux). This thread is locked after a contribution saying that the official copr repository is “integrated with SELinux” - well, I installed from copr as another way to try to make things work, and it didn’t help, so there’s still something up.
Anyway, if this note helps someone avoid the problem in the future, I’ll be happy.