Erro ao executar o apache2

0

Quando executo o comando: sudo service apache2 status , recebo este erro:

Dec 15 22:37:26 raspberrypi apache2[17459]: Starting web server: apache2 failed!
Dec 15 22:37:26 raspberrypi apache2[17459]: The apache2 configtest failed. ... (warning).
Dec 15 22:37:26 raspberrypi apache2[17459]: Output of config test was:
Dec 15 22:37:27 raspberrypi apache2[17459]: apache2:   
 Syntax error on line 225 of /etc/apache2/apache2.conf:  /etc/apache2/apache2.conf:225: <FilesMatch> was not closed.
Dec 15 22:37:27 raspberrypi apache2[17459]: Action 'configtest' failed.
Dec 15 22:37:27 raspberrypi apache2[17459]: The Apache error log may have more information.
Dec 15 22:37:27 raspberrypi systemd[1]: apache2.service: control process exited, code=exited status=1
Dec 15 22:37:27 raspberrypi systemd[1]: Failed to start LSB: Apache2 web server.
Dec 15 22:37:27 raspberrypi systemd[1]: Unit apache2.service entered failed state.
Dec 15 22:40:08 raspberrypi systemd[1]: Unit apache2.service cannot be reloaded because it is inactive.

No arquivo que tenho nessa linha:

Include /etc/phpmyadmin/apache.conf

<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>

O que está errado aí?

    
por Nmaster88 16.12.2017 / 10:03

2 respostas

2

coloque \.php$ entre aspas duplas

<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>

reiniciar apache2 :

sudo service apache2 restart

se isso não resolver o problema, altere FilesMatch para LocationMatch e reinicie apache2

<LocationMatch "\.php$">
SetHandler application/x-httpd-php
</LocationMatch>
    
por MehrdadEP 16.12.2017 / 10:36
0

Obrigado pela resposta.

Não sei o que aconteceu com esse arquivo e / ou o apache. Fiz algumas alterações através do ssh usando o nano, mas acho que nem toquei nesse arquivo específico.

De qualquer forma, eu reinstalei o apache2 e está funcionando novamente.

    
por Nmaster88 16.12.2017 / 22:12