Hi,here is my first contribution on hy.
The example will be on CentOS.
Our security will be based on two simple things in nginx configuration:
user-agent.
php extension.
The idea is simple, it is :
To change the file extension of the gate ".php" into something else. in our tutorial, ".gte" will be taken as example.
Configure nginx to process the files ".gte" as ".php".
Lock all access (Get) to php files (and other extensions if we want) of our panel on a long user-agent (if user-agent is false return 404).
Nginx installation:
Configure Nginx :
nginx.conf (/etc/nginx/nginx.conf) :
note : "server_tokens off" is a must to hide nginx version.
php-fpm users, sockets config (/etc/php-fpm/conf.d/www.conf)
dmain-name.conf (/etc/nginx/conf.d/domain-name.conf):
Of course you can add other extensions to the user agent restriction rule as many as you want.
Done !
This config can help to hide panel files and avoid sqli.
Just use the extension of chrome:
The example will be on CentOS.
Our security will be based on two simple things in nginx configuration:
user-agent.
php extension.
The idea is simple, it is :
To change the file extension of the gate ".php" into something else. in our tutorial, ".gte" will be taken as example.
Configure nginx to process the files ".gte" as ".php".
Lock all access (Get) to php files (and other extensions if we want) of our panel on a long user-agent (if user-agent is false return 404).
Nginx installation:
Configure Nginx :
nginx.conf (/etc/nginx/nginx.conf) :
note : "server_tokens off" is a must to hide nginx version.
php-fpm users, sockets config (/etc/php-fpm/conf.d/www.conf)
dmain-name.conf (/etc/nginx/conf.d/domain-name.conf):
Of course you can add other extensions to the user agent restriction rule as many as you want.
Done !
This config can help to hide panel files and avoid sqli.
Just use the extension of chrome: