M
M
Maxim2014-11-07 21:12:04
Apache HTTP Server
Maxim, 2014-11-07 21:12:04

Why does the permission denied error appear?

I'm trying to connect ssl to apache.
But an error occurs

Permission denied: Init: Can't open server certificate file /etc/httpd/conf/ssl/server.crt

for the sake of the purity of the experiment, I set everyone full rights to this file.
checked the path, also correct. what else could be the reason?
httpd.conf
NameVirtualHost *:443

<VirtualHost *:443>
  ServerName www.onko4.local
  DocumentRoot /var/www/html
  SSLEngine on
  SSLCertificateFile /etc/httpd/conf/ssl/server.crt
  SSLCertificateKeyFile /etc/httpd/conf/ssl/server.key
</VirtualHost>

NameVirtualHost *:80
  
<VirtualHost *:80>
  ServerName Default
  DocumentRoot /var/www/html
</VirtualHost>

<VirtualHost *:80>
  ServerName www.onko4.local
        ServerAdmin [email protected]host
        DocumentRoot /var/www/html
        #ErrorLog /var/httpd/www/logs/error.log
        TransferLog logs/access.log
</VirtualHost>

<VirtualHost *:80>
        ServerName req.onko4.local
        ServerAdmin [email protected]
        DocumentRoot /var/www/html/req
        #ErrorLog /var/https/lib/logs/error.log
        TransferLog logs/access.log
</VirtualHost>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim, 2014-11-07
@maxpointn2point

Disabled Selinux and everything worked

I
Igor, 2014-11-07
@merryjane

Log in as the problem user:
and manually check if he has read permissions:
cat /var/www/ssl/server.crt

R
Rsa97, 2014-11-07
@Rsa97

Check the permissions on all directories along the path to the file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question