
Configuré un nuevo servidor CentOS 7 + Apache 2.4 en Google Compute y tengo algunos problemas para configurar y funcionar mis hosts virtuales. Anteriormente estaba en el servidor Apache CentOS 6 + 2.2.
La CustomLog
siguiente línea es lo que hace que Apache arroje el error y se niegue a iniciar. En otras palabras, si comento esa línea, Apache se inicia bien y entrega los archivos en mi archivo DocumentRoot
.
<VirtualHost *:80>
ServerName bethesparkle.com
ServerAlias www.bethesparkle.com
<Directory /var/www/users/kenny/domains/bethesparkle.com/html>
Options Indexes FollowSymLinks MultiViews ExecCGI Includes
AllowOverride All
</Directory>
DocumentRoot /var/www/users/kenny/domains/bethesparkle.com/html
CustomLog /var/www/users/kenny/domains/bethesparkle.com/logs/access.log combined
</VirtualHost>
Esto es lo que aparece en el registro de errores cuando intento iniciar Apache:
[log_config:error] [pid 27405] (13)Permission denied: AH00649: could not open transfer log file /var/www/users/kenny/domains/bethesparkle.com/logs/access.log.
AH00015: Unable to open logs
He estado usando Linux y Unix durante años, pero soy nuevo en SELinux, para su información. Aquí está el resultado de ls -Zd
cada directorio que conduce al directorio de registros:
drwxr-xr-x. root root system_u:object_r:var_t:s0 /var
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 /var/www
drwxr-xr-x. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 /var/www/users
drwxr-xr-x. kenny apache unconfined_u:object_r:httpd_sys_content_t:s0 /var/www/users/kenny
drwxr-xr-x. kenny apache unconfined_u:object_r:httpd_sys_content_t:s0 /var/www/users/kenny/domains
drwxr-xr-x. kenny apache unconfined_u:object_r:httpd_sys_content_t:s0 /var/www/users/kenny/domains/bethesparkle.com
drwxrwxr-x. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 /var/www/users/kenny/domains/bethesparkle.com/logs
¿Qué estoy haciendo mal?