Skip to content

Instantly share code, notes, and snippets.

View dodyagung's full-sized avatar
🏠
Working from home

Dody dodyagung

🏠
Working from home
View GitHub Profile
@dodyagung
dodyagung / .htaccess
Created September 4, 2017 08:24
laravel 5.4 openlitespeed rewrite rules
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
Add this to your http {} of the nginx.conf file normally located at /etc/nginx/nginx.conf:
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
Then add this to your php location block, this will be located in your vhost file look for the block that begins with location ~ .php$ {
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
@dodyagung
dodyagung / Handler.php
Last active March 3, 2018 17:25
Lumen 5.6 Exception Render in JSON
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Validation\ValidationException;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Laravel\Lumen\Exceptions\Handler as ExceptionHandler;
use Symfony\Component\HttpKernel\Exception\HttpException;
@dodyagung
dodyagung / daemon.json
Created March 4, 2020 08:56
Could you specifically explain how I would configure the Docker Daemon to only use the 172.*.0.0/16 network ranges in /etc/docker/daemon.json?
# cat /etc/docker/daemon.json
{
"default-address-pools":
[
{"base":"172.17.0.0/16","size":24}
]
}