I'm trying to set up a laravel application with an apache 2.4.10 (on debian). The laravel application uses the gate facade to manage authorization. The thing is, the pages using gate aren't working as expected, for instance:
public function __construct()
{
$this->middleware('auth');
if (Gate::denies('user')) {
abort(404);
}
}
returns the 404 page....
On another hand, the application recognizes that i am authenticated thanks to the logins stored in the db.
Moreover, the application is working great on Laragon, so it tried to compare the permissions on both apache config but i didn't find any difference.
Here is an extract of the virtual host file i created for the laravel application:
ServerName www.supervision-grolleau.fr
DocumentRoot "/var/www/******/public"
<Directory "/var/www/******/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
With my little experience of laravel, i don't think the problem is bounded to .htaccess or anything else but permissions as it is working on Laragon.I would appreciate tremendously help on this topic! Thanks you.
PS: I'm a noob of laravel.