Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

197
Visualizações
How do I check the apache config for validity in Red Hat Linux?

My operating system is Red Hat Enterprise Linux 7. This isn't working...

# httpd -t
bash: httpd: command not found

In case it helps, this is the command I run to restart apache on this box...

# systemctl restart httpd24-httpd

But this doesn't work...

# httpd24-httpd -t
bash: httpd24-httpd: command not found

This doesn't work either...

# apachectl -t
bash: apachetl: command not found

Nor does this work...

# apachectl configtest
bash: apachetl: command not found
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I know this is a couple months old but ended up here. I ran into the same issue initially, hence why I am here. I found that the location for the new httpd24-httpd wasn't in my env path to execute. While I could added it there, I found the command location and was able to execute.

How I found the command:

sudo find / -name apachectl

The output of the command:

/opt/rh/httpd24/root/usr/sbin/apachectl

Executed the command:

sudo /opt/rh/httpd24/root/usr/sbin/apachectl

Turns out I have to fix my configuration.

httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 40 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-base.conf: Cannot load modules/mod_http2.so into server: libnghttp2-httpd24.so.14: cannot open shared object file: No such file or directory

Interesting that this came up for me, as I've not done anything with the configuration in this regard.

Here's the version I am running.

sudo /opt/rh/httpd24/root/usr/sbin/apachectl -v

Server version: Apache/2.4.34 (Red Hat) Server built: Mar 17 2020 09:34:59

All the best!

Found something more for this as well from an old bug submitted to Redhat

Bug 1329639

Comment 10

scl enable httpd24 -- /opt/rh/httpd24/root/usr/sbin/apachectl configtest
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda