How To Enable HTTP/3 over QUIC in HAProxy
November 10th, 2023 08:30 PM | Ubuntu | No Comment
What's QUIC
QUIC (Quick UDP Internet Connections) is a transport layer network protocol developed by Google. QUIC supports a set of multiplexed connections between two endpoints over User Datagram Protocol (UDP), and it was designed to provide security protection equivalent to ...
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
$ curl -I localhost/index.php
HTTP/1.1 200 OK
Date: Sat, 12 Aug 2017 14:07:54 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.5.9-1ubuntu4.22
How to hide PHP-FPM Version (X-Powered-By:) on NGINX
vim /etc/php5/fpm/php.ini
expose_php = Off
Restart php5-fpm service
/etc/init.d/php5-fpm restart
Check the result
$ curl -I localhost/index.php
HTTP/1.1 200 ...
Hide Server Info Response on NGINX
August 12th, 2017 05:00 AM | NGINX | No Comment
How to hide `Server:` Response info on NGINX
$ curl -I localhost
HTTP/1.1 200 OK
Server: nginx/1.4.6 (Ubuntu)
Date: Fri, 11 Aug 2017 14:09:04 GMT
Content-Type: text/html
Content-Length: 612
Last-Modified: Tue, 04 Mar 2014 11:46:45 GMT
Connection: keep-alive
ETag: "5315bd25-264"
Accept-Ranges: bytes
To hide `Server:` on HTTP Response, you need install ...
Free ext4 reserved blocks with tune2fs
February 18th, 2017 04:35 AM | Linux | No Comment
Check disk usage
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 95G 82G 7.9G 92% /
Check size of Reserved block count
tune2fs -l /dev/vda1 | ...
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
vim /etc/nginx/nginx.conf
http {
geo $ban_ip {
default 0;
include ban_ip.conf;
}
}
that will blocked ip by clientip on access.log, if want to block ...
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
vim /etc/xymon/scripts/alert_to_slack.sh
#!/bin/bash
hostname=$BBHOSTNAME
level=$BBCOLORLEVEL
msg=$BBALPHAMSG
title="$BBHOSTSVC $level"
url="https://hooks.slack.com/services/XXXXXXXXXXXXXX/XXXXXXXXXXXXXXXXXX"
channel="#${RCPT}"
assigned="@channel"
if ]; then
emoji=":rage:"
color="danger"
status="Critical!"
elif ]; then
emoji=":sunny:"
color="warning"
status="Warning!"
elif ]; then
emoji=":white_check_mark:"
...