Tag Archives: laravel

laravel hacked database

Its serious security issue this default Laravel configuration. because .env file and database credentials are not protected. So you need to create a .htaccess file in same folder to protect it:

<Files .env>
order allow,deny
Deny from all
</Files>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

Failed to load resource: the server responded with a status of 405 (Method Not Allowed)

[allowmethods:error] [pid 688212:tid 139871391713024] [client xx.xx.xx.xx:41682] AH01623: client method denied by server configuration: ‘PATCH’

this means server do not support PATCH, if this id directadmin server:

cd /usr/local/directadmin/custombuild
./build set http_methods GET:HEAD:POST:PUT:DELETE:PATCH
./build rewrite_confs