My laravel website works as expected in 99% of the cases. But, some URLs give a 500 internal server error. When I check the log file it contains many lines like this:
[access_compat:error] AH01797: client denied by server configuration:
Below is the content of my host configuration file (apache) I'm using http authentication before my actual website login:
<Location />
Deny from all
AuthUserFile /etc/apache2/.htpasswd
AuthName "Restricted area"
AuthType Basic
Satisfy Any
require valid-user
</Location>
<Directory "/var/www/html/mysite/">
AllowOverride All
</Directory>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/jpg "access plus 60 days"
ExpiresByType image/png "access plus 60 days"
ExpiresByType image/gif "access plus 60 days"
ExpiresByType image/jpeg "access plus 60 days"
ExpiresByType text/css "access plus 1 days"
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/javascript "access plus 1 week"
</IfModule>
Apache version Server version: Apache/2.4.41 (Ubuntu) Server built: 2020-08-12T19:46:17