Reset root password on CentOS 7
April 8th, 2018 02:37 PM | Linux | No Comment
Edit boot menu on-the-go
0. reboot the CentOS 7 and press ESC when GRUB menu show up on the screen and press "e"
1. find "ro" on "linux16" section and then change to "rw init=/sysroot/bin/sh"
2. press "CTRL + x" to reboot CentOS ...
Hide PHP-FPM Version on NGINX
August 12th, 2017 02:06 PM | NGINX | No Comment
Check PHP-FPM version on NGINX HTTP response
How to hide PHP-FPM Version (X-Powered-By:) on NGINX
Restart php5-fpm service
Check the result
Hide Server Info Response on NGINX
August 12th, 2017 05:00 AM | NGINX | No Comment
How to hide Server: Response info on NGINX
To hide Server: on HTTP Response, you need install nginx-extras instead nginx/nginx-core
Install nginx-extras on Ubuntu
add these line on http {}
Test / check the result
you will see Server: nginx/1.4.6 (Ubuntu) is gone.
Free ext4 reserved blocks with tune2fs
February 18th, 2017 04:35 AM | Linux | No Comment
Check disk usage
Check size of Reserved block count
Change Reserved block count to 0%
Check disk usage
Block or ban ip with NGINX
December 22nd, 2016 11:47 AM | NGINX | No Comment
How to block ip with NGINX
0. define block ip on nginx.conf
that will blocked ip by clientip on access.log, if want to block real ip behind proxy set like this:
1. define blocked ip in server {}
2. add ip in ban_ip.conf
3. test ...
Send Xymon/Hobbit Alerts to Slack Channel
October 8th, 2016 01:00 PM | Linux | No Comment
How to sent xymon/hobbit alerts to slack channel
0. create bash script to push xymon/hobbit alerts to slack
1. add script alert on hobbit/xymon-alerts.cfg
Redirect www and non-www http to non-www https on NGINX
September 3rd, 2016 12:27 PM | NGINX | No Comment
How to set up redirect www and non-www http to non-www https
o nginx config file
o testing config file and restart nginx