Apache2 + htaccess: "AllowOverride not allowed here"
Dica publicada em Linux / Software
Apache2 + htaccess: "AllowOverride not allowed here"
Foi uma briga para ativar o .htaccess no meu servidor, não funcionava e retornava o seguinte erro:
Restarting web server: apache2
We failed to correctly shutdown apache, so we're now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now! (warning).
... waiting .Syntax error on line 137 of /etc/apache2/apache2.conf:
AllowOverride not allowed here
failed!
De tanto procurar e mexer, descobri que se tratava apenas de problema de virtualhost.
Edite o caminho ou aonde estejam suas virtualhosts correspondentes:
# vi /etc/apache2/sites-available/default
Você deve alterar na virtualhost correspondente ao domínio que não aceita htaccess o seguinte:
De:
AllowOverride None Para:
Dê um reload no seu Apache:
# apache2ctl reload
Pronto! Coloque o .htaccess no caminho que quer limitar e seja feliz. E espero que venha a ser útil para alguém.
Restarting web server: apache2
We failed to correctly shutdown apache, so we're now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now! (warning).
... waiting .Syntax error on line 137 of /etc/apache2/apache2.conf:
AllowOverride not allowed here
failed!
De tanto procurar e mexer, descobri que se tratava apenas de problema de virtualhost.
Edite o caminho ou aonde estejam suas virtualhosts correspondentes:
# vi /etc/apache2/sites-available/default
Você deve alterar na virtualhost correspondente ao domínio que não aceita htaccess o seguinte:
De:
AllowOverride None Para:
AllowOverride all
Dê um reload no seu Apache:
# apache2ctl reload
Pronto! Coloque o .htaccess no caminho que quer limitar e seja feliz. E espero que venha a ser útil para alguém.
Parabéns por ter feito.