Eu tive um problema parecido e acontece que o Apache não gostou das linhas ErrorLog e CustomLog no container VirtualHost. Comentei-os e serviço começou sem nenhum problema.
Eu estou supondo que isso tem algo todo com permissões no httpd.conf
Estou tentando criar um servidor da Web, mas depois de adicionar a configuração de hosts virtuais, o apache não será reiniciado. Houve vários erros, mas consegui consertar a maioria deles. Agora eu não sei o que está acontecendo porque journalctl -xn
não me dá nenhuma dica.
Aqui estão os registros:
[root@localhost victorscarone]# systemctl restart httpd.service
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
[root@localhost victorscarone]# systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: failed (Result: exit-code) since vie 2015-09-11 22:54:27 PYT; 2s ago
Process: 2681 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 2679 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 2679 (code=exited, status=1/FAILURE)
sep 11 22:54:27 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
sep 11 22:54:27 localhost.localdomain kill[2681]: kill: cannot find process ""
sep 11 22:54:27 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
sep 11 22:54:27 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
sep 11 22:54:27 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
[root@localhost victorscarone]# journalctl -xn
-- Logs begin at vie 2015-09-11 22:20:49 PYT, end at vie 2015-09-11 22:54:27 PYT. --
sep 11 22:48:29 localhost.localdomain kill[2658]: kill: cannot find process ""
sep 11 22:48:29 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
sep 11 22:48:29 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
--
-- Unit httpd.service has failed.
--
-- The result is failed.
sep 11 22:48:29 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
sep 11 22:54:27 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
--
-- Unit httpd.service has begun starting up.
sep 11 22:54:27 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
sep 11 22:54:27 localhost.localdomain kill[2681]: kill: cannot find process ""
sep 11 22:54:27 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
sep 11 22:54:27 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
--
-- Unit httpd.service has failed.
--
-- The result is failed.
sep 11 22:54:27 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Por favor me ajude, é por uma boa causa (meu trabalho na faculdade: D)
Editar # 1 (09/12/2015 19:30 GMT -4)
Eu não sei o que acabei de fazer, mas testando o comando "httpd -t" @garethTheRed me disse, eu queria ver que ajuda tinha, então eu tentei "httpd -H" e executei. Em seguida, executar "apachectl restart" me deu o mesmo erro. Mas desta vez ao ver o "journalctl -xn" houve uma mudança. Ainda existe um erro no apache, mas ele já está sendo executado na página de teste 123. Entretanto, o vhost ainda não funciona.
Aqui estão as saídas depois disso.
[root@localhost victorscarone]# httpd -t
Syntax OK
[root@localhost victorscarone]# httpd --help
[root@localhost victorscarone]# httpd --h
httpd (pid 2977) already running
[root@localhost victorscarone]# systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: failed (Result: exit-code) since sáb 2015-09-12 19:12:42 PYT; 4min 53s ago
Process: 2965 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 2963 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 2963 (code=exited, status=1/FAILURE)
sep 12 19:12:42 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
sep 12 19:12:42 localhost.localdomain kill[2965]: kill: cannot find process ""
sep 12 19:12:42 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
sep 12 19:12:42 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
sep 12 19:12:42 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost victorscarone]# apachectl restart
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
[root@localhost victorscarone]# journalctl -xn
-- Logs begin at sáb 2015-09-12 19:07:51 PYT, end at sáb 2015-09-12 19:18:32 PYT. --
sep 12 19:18:18 localhost.localdomain kill[2993]: kill: cannot find process ""
sep 12 19:18:18 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
sep 12 19:18:18 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
--
-- Unit httpd.service has failed.
--
-- The result is failed.
sep 12 19:18:18 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
sep 12 19:18:32 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
--
-- Unit httpd.service has begun starting up.
sep 12 19:18:32 localhost.localdomain httpd[3001]: httpd (pid 2977) already running
sep 12 19:18:32 localhost.localdomain kill[3003]: kill: cannot find process ""
sep 12 19:18:32 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
sep 12 19:18:32 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
--
-- Unit httpd.service has failed.
--
-- The result is failed.
sep 12 19:18:32 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
[root@localhost victorscarone]# httpd -t
Syntax OK
Alguma idéia?
Editar # 2 24/09/2015 19:29 (GMT -4) Sinto muito pelo atraso, não tive tempo para continuar com isso, mas agora estou nisso novamente. Eu tentei o que @garethTheRed disse, mas fica preso em um ponto
[root@localhost victorscarone]# httpd -DFOREGROUND -e debug
[Thu Sep 24 19:26:01.249663 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module access_compat_module from /etc/httpd/modules/mod_access_compat.so
[Thu Sep 24 19:26:01.249913 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module actions_module from /etc/httpd/modules/mod_actions.so
[Thu Sep 24 19:26:01.249975 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module alias_module from /etc/httpd/modules/mod_alias.so
[Thu Sep 24 19:26:01.250021 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module allowmethods_module from /etc/httpd/modules/mod_allowmethods.so
[Thu Sep 24 19:26:01.250065 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module auth_basic_module from /etc/httpd/modules/mod_auth_basic.so
[Thu Sep 24 19:26:01.250130 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module auth_digest_module from /etc/httpd/modules/mod_auth_digest.so
[Thu Sep 24 19:26:01.250180 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module authn_anon_module from /etc/httpd/modules/mod_authn_anon.so
[Thu Sep 24 19:26:01.250230 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module authn_core_module from /etc/httpd/modules/mod_authn_core.so
[Thu Sep 24 19:26:01.250277 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module authn_dbd_module from /etc/httpd/modules/mod_authn_dbd.so
[Thu Sep 24 19:26:01.250324 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module authn_dbm_module from /etc/httpd/modules/mod_authn_dbm.so
[Thu Sep 24 19:26:01.250368 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module authn_file_module from /etc/httpd/modules/mod_authn_file.so
[Thu Sep 24 19:26:01.250422 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module authn_socache_module from /etc/httpd/modules/mod_authn_socache.so
[Thu Sep 24 19:26:01.250484 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module authz_core_module from /etc/httpd/modules/mod_authz_core.so
[Thu Sep 24 19:26:01.250541 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module authz_dbd_module from /etc/httpd/modules/mod_authz_dbd.so
[Thu Sep 24 19:26:01.250597 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module authz_dbm_module from /etc/httpd/modules/mod_authz_dbm.so
[Thu Sep 24 19:26:01.250650 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module authz_groupfile_module from /etc/httpd/modules/mod_authz_groupfile.so
[Thu Sep 24 19:26:01.250701 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module authz_host_module from /etc/httpd/modules/mod_authz_host.so
[Thu Sep 24 19:26:01.250857 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module authz_owner_module from /etc/httpd/modules/mod_authz_owner.so
[Thu Sep 24 19:26:01.250914 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module authz_user_module from /etc/httpd/modules/mod_authz_user.so
[Thu Sep 24 19:26:01.250986 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module autoindex_module from /etc/httpd/modules/mod_autoindex.so
[Thu Sep 24 19:26:01.251082 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module cache_module from /etc/httpd/modules/mod_cache.so
[Thu Sep 24 19:26:01.251370 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module cache_disk_module from /etc/httpd/modules/mod_cache_disk.so
[Thu Sep 24 19:26:01.251431 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module data_module from /etc/httpd/modules/mod_data.so
[Thu Sep 24 19:26:01.251498 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module dbd_module from /etc/httpd/modules/mod_dbd.so
[Thu Sep 24 19:26:01.251662 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module deflate_module from /etc/httpd/modules/mod_deflate.so
[Thu Sep 24 19:26:01.251805 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module dir_module from /etc/httpd/modules/mod_dir.so
[Thu Sep 24 19:26:01.251873 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module dumpio_module from /etc/httpd/modules/mod_dumpio.so
[Thu Sep 24 19:26:01.251929 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module echo_module from /etc/httpd/modules/mod_echo.so
[Thu Sep 24 19:26:01.251985 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module env_module from /etc/httpd/modules/mod_env.so
[Thu Sep 24 19:26:01.252044 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module expires_module from /etc/httpd/modules/mod_expires.so
[Thu Sep 24 19:26:01.252113 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module ext_filter_module from /etc/httpd/modules/mod_ext_filter.so
[Thu Sep 24 19:26:01.252184 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module filter_module from /etc/httpd/modules/mod_filter.so
[Thu Sep 24 19:26:01.252309 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module headers_module from /etc/httpd/modules/mod_headers.so
[Thu Sep 24 19:26:01.252392 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module include_module from /etc/httpd/modules/mod_include.so
[Thu Sep 24 19:26:01.252475 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module info_module from /etc/httpd/modules/mod_info.so
[Thu Sep 24 19:26:01.252547 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module log_config_module from /etc/httpd/modules/mod_log_config.so
[Thu Sep 24 19:26:01.252611 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module logio_module from /etc/httpd/modules/mod_logio.so
[Thu Sep 24 19:26:01.252684 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module mime_magic_module from /etc/httpd/modules/mod_mime_magic.so
[Thu Sep 24 19:26:01.252822 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module mime_module from /etc/httpd/modules/mod_mime.so
[Thu Sep 24 19:26:01.252916 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module negotiation_module from /etc/httpd/modules/mod_negotiation.so
[Thu Sep 24 19:26:01.252985 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module remoteip_module from /etc/httpd/modules/mod_remoteip.so
[Thu Sep 24 19:26:01.253050 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module reqtimeout_module from /etc/httpd/modules/mod_reqtimeout.so
[Thu Sep 24 19:26:01.253150 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module rewrite_module from /etc/httpd/modules/mod_rewrite.so
[Thu Sep 24 19:26:01.253219 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module setenvif_module from /etc/httpd/modules/mod_setenvif.so
[Thu Sep 24 19:26:01.253303 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module slotmem_plain_module from /etc/httpd/modules/mod_slotmem_plain.so
[Thu Sep 24 19:26:01.253373 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module slotmem_shm_module from /etc/httpd/modules/mod_slotmem_shm.so
[Thu Sep 24 19:26:01.253440 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module socache_dbm_module from /etc/httpd/modules/mod_socache_dbm.so
[Thu Sep 24 19:26:01.253503 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module socache_memcache_module from /etc/httpd/modules/mod_socache_memcache.so
[Thu Sep 24 19:26:01.253567 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module socache_shmcb_module from /etc/httpd/modules/mod_socache_shmcb.so
[Thu Sep 24 19:26:01.253638 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module status_module from /etc/httpd/modules/mod_status.so
[Thu Sep 24 19:26:01.253747 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module substitute_module from /etc/httpd/modules/mod_substitute.so
[Thu Sep 24 19:26:01.253823 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module suexec_module from /etc/httpd/modules/mod_suexec.so
[Thu Sep 24 19:26:01.253884 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module unique_id_module from /etc/httpd/modules/mod_unique_id.so
[Thu Sep 24 19:26:01.253960 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module unixd_module from /etc/httpd/modules/mod_unixd.so
[Thu Sep 24 19:26:01.254028 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module userdir_module from /etc/httpd/modules/mod_userdir.so
[Thu Sep 24 19:26:01.254094 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module version_module from /etc/httpd/modules/mod_version.so
[Thu Sep 24 19:26:01.254157 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module vhost_alias_module from /etc/httpd/modules/mod_vhost_alias.so
[Thu Sep 24 19:26:01.254350 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module dav_module from /etc/httpd/modules/mod_dav.so
[Thu Sep 24 19:26:01.254491 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module dav_fs_module from /etc/httpd/modules/mod_dav_fs.so
[Thu Sep 24 19:26:01.255042 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module dav_lock_module from /etc/httpd/modules/mod_dav_lock.so
[Thu Sep 24 19:26:01.255892 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module lua_module from /etc/httpd/modules/mod_lua.so
[Thu Sep 24 19:26:01.256053 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module mpm_prefork_module from /etc/httpd/modules/mod_mpm_prefork.so
[Thu Sep 24 19:26:01.256261 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module proxy_module from /etc/httpd/modules/mod_proxy.so
[Thu Sep 24 19:26:01.256362 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module lbmethod_bybusyness_module from /etc/httpd/modules/mod_lbmethod_bybusyness.so
[Thu Sep 24 19:26:01.256434 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module lbmethod_byrequests_module from /etc/httpd/modules/mod_lbmethod_byrequests.so
[Thu Sep 24 19:26:01.256505 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module lbmethod_bytraffic_module from /etc/httpd/modules/mod_lbmethod_bytraffic.so
[Thu Sep 24 19:26:01.256709 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module lbmethod_heartbeat_module from /etc/httpd/modules/mod_lbmethod_heartbeat.so
[Thu Sep 24 19:26:01.256904 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module proxy_ajp_module from /etc/httpd/modules/mod_proxy_ajp.so
[Thu Sep 24 19:26:01.257042 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module proxy_balancer_module from /etc/httpd/modules/mod_proxy_balancer.so
[Thu Sep 24 19:26:01.257142 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module proxy_connect_module from /etc/httpd/modules/mod_proxy_connect.so
[Thu Sep 24 19:26:01.257227 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module proxy_express_module from /etc/httpd/modules/mod_proxy_express.so
[Thu Sep 24 19:26:01.257334 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module proxy_fcgi_module from /etc/httpd/modules/mod_proxy_fcgi.so
[Thu Sep 24 19:26:01.257421 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module proxy_fdpass_module from /etc/httpd/modules/mod_proxy_fdpass.so
[Thu Sep 24 19:26:01.257543 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module proxy_ftp_module from /etc/httpd/modules/mod_proxy_ftp.so
[Thu Sep 24 19:26:01.257736 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module proxy_http_module from /etc/httpd/modules/mod_proxy_http.so
[Thu Sep 24 19:26:01.257861 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module proxy_scgi_module from /etc/httpd/modules/mod_proxy_scgi.so
[Thu Sep 24 19:26:01.258128 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module systemd_module from /etc/httpd/modules/mod_systemd.so
[Thu Sep 24 19:26:01.258301 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module cgi_module from /etc/httpd/modules/mod_cgi.so
[Thu Sep 24 19:26:01.272364 2015] [so:debug] [pid 2603] mod_so.c(266): AH01575: loaded module php5_module from /etc/httpd/modules/libphp5.so
Eu tive um problema parecido e acontece que o Apache não gostou das linhas ErrorLog e CustomLog no container VirtualHost. Comentei-os e serviço começou sem nenhum problema.
Eu estou supondo que isso tem algo todo com permissões no httpd.conf
Tente reinicializar totalmente o sistema, parece que está tentando matar um processo que não existe mais.
sudo reboot
Quando o sistema for totalmente reinicializado, tente executar o comando novamente.
sudo systemctl restart httpd
Isso deve funcionar, se não funcionar, por favor poste a saída 'journalctl -xn'.
Para qualquer um que se deparar com este problema no futuro, não desative o SElinux, aprenda como usá-lo. Desativar é quase como remover toda a segurança de uma arma de fogo porque o gatilho não funciona quando você tenta atirar.
Esta é a maneira correta de abordar esse problema:
'chcon -t httpd_sys_rw_content_t /var/www/html -R'
Permitirá que as permissões do apache leiam e gravem no diretório especificado.
Apenas systemctl restart httpd
depois e você deve estar pronto.
Como postado por @MADforFUNandHappy
Talvez você tenha um problema de semáforo ...
Tente alterar seus valores de sysctl:
kernel.msgmni = 1024
kernel.sem = 250 32000 100 512
kernel.shmmax = 16296951808
kernel.shmall = 17039360
Recarregue e tente reiniciar.
Atenciosamente
Para mim, funcionou desabilitando o selinux no CentOS7
Para desabilitar permanentemente após a reinicialização, faça:
sudo nano /etc/selinux/config
SELINUX=permissive or disabled
salve o arquivo
sudo setenforce 0
e verifique com
sestatus
Pelo que eu recolhi, a razão geral para isso é por causa das permissões do SELinux. Quando você cria o virtualhosts, o SELinux espera que você crie tipos do SELinux para cada host virtual, de modo que cada host não possa atropelar ou ler arquivos de outro host que faça sentido.
Se você tem policycoreutils
instalado, pode usar audit2why
para ver o que está sendo negado e, muitas vezes, sugere maneiras de remediar isso (nem sempre é o melhor meio de consertando o problema, mas freqüentemente o mais rápido sem apenas desabilitar o SELinux).
Por exemplo, para ver todo o acesso negado no log de auditoria: audit2why <<< "$(</var/log/audit/audit.log)"
Você provavelmente verá algo nos seguintes termos:
type=AVC msg=audit(1528554604.842:403): avc: denied { append } for pid=34797 comm="httpd" name="error.log" dev="sda2" ino=51161328 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:httpd_sys_content_t:s0 tclass=file
Was caused by:
The boolean httpd_unified was set incorrectly.
Description:
Allow httpd to unified
Allow access by executing:
# setsebool -P httpd_unified 1
Nesse caso, ativar httpd_unified
permite que o httpd seja iniciado corretamente, pois permite que todos os vhosts compartilhem o contexto de tipo, o que é menos seguro, mas novamente é melhor do que desativar o SELinux.
Veja: link