maybe i just can't search in internet but i stuck with that:

I have Fedora Server 31 with httpd installed.
I added small vhosts config:

Listen 3000
<VirtualHost *:3000>
    DocumentRoot "/var/www/example.com/public_html"
    ServerName gamebox-x.com
    SSLEngine On
    SSLCertificateFile "/var/certs/domain.cert"
    SSLCertificateKeyFile "/var/certs/domain.key"
    SSLCertificateChainFile "/var/certs/ca.cert"

On systemctl status httpd.service:

httpd[21703]: AH00526: Syntax error on line 6 of /etc/httpd/conf.d/example.com.conf:
httpd[21703]: SSLCertificateFile: file '/var/certs/domain.cert' does not exist or is empty
systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: httpd.service: Failed with result 'exit-code'.
systemd[1]: Failed to start The Apache HTTP Server.

but in file system i actually have all files:

ls -l /var/certs
total 24
-rwxrwxrwx. 1 root root 3243 mar 28 18:23 account.key
-rw-r--r--. 1 root root 1648 mar 29 15:01 ca.cert
-rwxr-xr-x. 1 root root 2277 mar 29 15:01 domain.cert
-rwxr-xr-x. 1 root root 3243 mar 29 15:02 domain.key

from my user this files are visible...

What did I miss?

  • Do you have SELinux in enforcing mode? – garethTheRed Mar 29 '20 at 17:35
  • @garethTheRed , yes it's in enforcing mode... (SELINUX=enforcing SELINUXTYPE=targeted) – Mykola Kikets Mar 29 '20 at 17:39
  • Have you tried temporarily putting it into permissive mode so that you can figure out if it's an SELinux issue or not? – garethTheRed Mar 29 '20 at 17:48
  • @garethTheRed , in this mode httpd can't even start... httpd.service: Failed with result 'timeout'. I actually trying to configure it with sslh (i hoped that would be working with nginx) – Mykola Kikets Mar 29 '20 at 18:12
  • I would leave SELinux in permissive mode and investigate this timeout. – garethTheRed Mar 29 '20 at 18:59

To solve my problem i used command:

chcon -t cert_t

for each file which is related in config...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.