Skip to content

Instantly share code, notes, and snippets.

@cras4202tw
cras4202tw / CentOS 8 LNMP
Last active July 6, 2020 09:21
CentOS 8 LNMP
#!/bin/bash
clear
setenforce 0
sed -i 's/^SELINUX=.*$/SELINUX=disabled/' /etc/selinux/config
sed -i 's@LANG=.*$@LANG="en_US.UTF-8"@g' /etc/locale.conf
cat > /etc/yum.repos.d/nginx.repo << EOF
[nginx]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/8/\$basearch/
gpgcheck=0
-------------------------------------------------
nench.sh v2018.04.14 -- https://git.io/nench.sh
benchmark timestamp: 2018-08-08 02:57:01 UTC
-------------------------------------------------
Processor: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
CPU cores: 1
Frequency: 2199.998 MHz
RAM: 992M
Swap: -
@cras4202tw
cras4202tw / gist:45f40f819dd805c22f385686b6057fc4
Created August 3, 2018 02:36
Remove Try Gutenberg Notice
remove_action( 'try_gutenberg_panel', 'wp_try_gutenberg_panel' );
118.163.92.212 - - [08/Feb/2018:08:38:40 +0800] "GET /wp-admin/load-scripts.php HTTP/1.1" 404 571 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
118.163.92.212 - - [08/Feb/2018:09:01:54 +0800] "GET /wp-admin/load-scripts.php?dsada HTTP/1.1" 404 571 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
[Definition]
failregex = ^<HOST> - - .* "GET /wp-admin/load-scripts.php
ignoreregex =
[DEFAULT]
bantime = -1
banaction = iptables-multiport
[wp-load-script]
enabled = true
port = http,https
filter = wordpress-load-script
logpath = /var/log/nginx/access.log
define('DISABLE_WP_CRON', false);
define('DISABLE_WP_CRON', true);