Category: Nginx

How to install laravel & php 7.2

There are few things we need for this tutorial. PHP 7.2+ REF : https://www.chris-shaw.com/blog/installing-php-7.2-on-debian-8-jessie-and-debian-9-stretch Composer REF : https://getcomposer.org/doc/00-intro.md#downloading-the-composer-executable laravel Okay , so we will start intall for php 7.2 ++ and below are the...

Codeigniter Rewrite for nginx & apache

Rewrite Rules for nginx must be added into each domain’s configuration. location /path/to/project{ try_files $uri $uri/ /path/to/project/index.php?/$request_uri; } Rewrite Rules for apache can be added in the project’s .htaccess. RewriteEngine on RewriteCond $1 !^(index\.php|assets|images|js|css|uploads|favicon.png)...

Prevent Curl Wget for Web server

Nginx ## # Block User Agent (Jorgee Vulnerability scan) ## if ($http_user_agent ~* (Jorgee|curl|wget) ){ return 403; } Apache RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^$ [OR] RewriteCond %{HTTP_USER_AGENT} ^.*(|’|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^.*(HTTrack|clshttp|archiver|loader|email|nikto|miner|python).* [NC,OR] RewriteCond...