Skip to content

Instantly share code, notes, and snippets.

@dakoctba
Created August 30, 2014 22:10
Show Gist options
  • Select an option

  • Save dakoctba/71db1180a844fc43b9b4 to your computer and use it in GitHub Desktop.

Select an option

Save dakoctba/71db1180a844fc43b9b4 to your computer and use it in GitHub Desktop.
How to configure Apache 5.4 to run Silex
1) Ativar o módulo de redirecionamento de URL
sudo a2enmod rewrite
2) Entrar no arquivo /etc/apache2/sites-available/default e substituir todas as chamadas de "AllowOverride None" por "AllowOverride All"
3) Criar um arquivo ".htaccess" na raiz da aplicação com o seguinte conteúdo:
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
#RewriteBase /path/to/app
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>
4) Reiniciar o apache
sudo /etc/init.d/apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment