也许我只是无法在互联网上搜索,但我坚持这样做:
我已httpd
安装Fedora Server 31。
我添加了一些小vhosts
配置:
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"
</VirtualHost>
在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.
但在文件系统中我实际上拥有所有文件:
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
从我的用户来看,这些文件是可见的......
我错过了什么?
答案1
为了解决我的问题我使用了命令:
chcon -t cert_t
对于配置中相关的每个文件......