Skip to content

Instantly share code, notes, and snippets.

@ceessay
Last active April 3, 2019 19:09
Show Gist options
  • Save ceessay/4b9813a0e183ca13bbee5e52a79e9c93 to your computer and use it in GitHub Desktop.
Save ceessay/4b9813a0e183ca13bbee5e52a79e9c93 to your computer and use it in GitHub Desktop.
dans /etc/apache2/apache2.conf chercher la balise <Directory /var/www/> et mettre
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ajouter un alias vers le dossier public de ton projet laravel
dans les fichiers /etc/apache2/sites-available/000-default.conf et /etc/apache2/sites-enabled/000-default.conf
Alias /tsapp /var/www/html/tsapp/public
<Directory /var/www/html/tsapp>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
creer un .htaccess dans public s'il le faut et mettre
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteBase /tsapp/
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
@lionnelpat
Copy link

Thank's for this Gist...
It help me a lot
Be blessed guy

@ceessay
Copy link
Author

ceessay commented Apr 3, 2019

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment