Skip to content

Commit ce38934

Browse files
committed
daily
1 parent 8dca2f3 commit ce38934

File tree

11 files changed

+20
-29
lines changed

11 files changed

+20
-29
lines changed

.typos.toml

+3
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,6 @@ extend-ignore-re = [
6767
"Github" = "GitHub"
6868
"Wordpress" = "WordPress"
6969
"Automattic" = "Automattic"
70+
71+
[type.py.extend-identifiers]
72+
"typ" = "typ"

debian-setup/debian-setup2.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ packages/most
3838
# Manual checks
3939
packages/_check-system
4040

41+
# Dump PCI device IDs
42+
lspci -n >"${HOME}/lspci.out"
43+
4144
# Basic packages
4245
Pkg_install_quiet \
4346
localepurge unattended-upgrades apt-listchanges debsums \
@@ -334,9 +337,6 @@ adduser USER
334337
# TODO - server backup
335338
./install.sh backup/system-backup.sh
336339
# TODO - monit/apache+php
337-
lspci -n >lspci.out
338-
monitoring/monit/monit-debian-setup.sh
339-
# TODO - Monitoring
340340
open https://github.com/szepeviktor/debian-server-tools/blob/master/monitoring/README.md
341341
342342
EOT

debian-setup/packages/adduser

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ EOF
177177

178178
# Add mc syntax highlights
179179
ROOT_MC_SYNTAX="/root/.local/share/mc/mcedit"
180-
ROOT_MC_SYNTAX_CONFIG="/root/.config/mc/mcedit"
180+
ROOT_MC_SYNTAX_CONFIG="/root/.local/share/mc/syntax"
181181
mkdir -p "$ROOT_MC_SYNTAX"
182182
wget -nv -P "$ROOT_MC_SYNTAX" https://github.com/szepeviktor/debian-server-tools/raw/master/input/mc/email.syntax
183183
wget -nv -P "$ROOT_MC_SYNTAX" https://github.com/szepeviktor/debian-server-tools/raw/master/input/mc/markdown.syntax

webserver/add-prg-site-auto.sh

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ makealiases
4646

4747
# Website directories
4848
(
49+
chmod 0750 "/home/${U}"
4950
cd /home/${U}/
5051
install -o ${U} -g ${U} -m 0550 -d website
5152
cd website/

webserver/add-prg-site-local-auto.sh

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ makealiases
3232

3333
# Website directories
3434
(
35+
chmod 0750 "/home/${U}"
3536
cd /home/${U}/
3637
install -o ${U} -g ${U} -m 0550 -d website
3738
cd website/

webserver/add-site-auto.sh

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ adduser --disabled-password --gecos "" "$U"
1818
adduser _web "$U"
1919

2020
# Website directories
21+
chmod 0750 "/home/${U}"
2122
mkdir -v --mode=0750 "/home/${U}/website"
2223
mkdir -v "/home/${U}/website/"{session,tmp,code,pagespeed,backup}
2324
chmod 0555 "/home/${U}/website/code"

webserver/add-site.sh

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ editor "${S}/authorized_keys"
3232
echo "ssh://${U}@${DOMAIN}:SSH-PORT/home/${U}/dev.git"
3333

3434
# Website directories
35+
chmod 0750 "/home/${U}"
3536
mkdir -v --mode=0750 "/home/${U}/website"
3637
#mkdir -v /home/${U}/website/{session,tmp,code,pagespeed,backup,fastcgicache}
3738
mkdir -v "/home/${U}/website/"{session,tmp,code,pagespeed,backup}

webserver/apache-conf-available/wordpress.inc.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</LocationMatch>
3636

3737
# Plugins and themes `*.php` (no root, no dollar sign)
38-
<LocationMatch "/(mu-plugins|plugins|themes)/.*\.php">
38+
<LocationMatch "/(languages|mu-plugins|plugins|themes)/.*\.php">
3939
Require all denied
4040
</LocationMatch>
4141
# Exclude custom entry points created by poorly written plugins and themes

webserver/apache-sites-available/_htaccess-snippets.conf

+5
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ Header set Connection "Close" env=YANDEXBOT
138138
RewriteCond "%{HTTP_USER_AGENT}" "SitemapProbe"
139139
RewriteRule "trafficbasedsspsitemap\.xml" - [F]
140140

141+
# TikTok bytedance.com
142+
RewriteCond "%{HTTP_USER_AGENT}" "Bytespider"
143+
# 429 Too Many Requests
144+
RewriteRule "^" - [R=429,L]
145+
141146
# Fancybox for old IE
142147
<IfModule mod_rewrite.c>
143148
RewriteEngine On

webserver/php-fpm.sh

+3
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,6 @@ fi
120120

121121
# Siteprotection
122122
Dinstall monitoring/siteprotection.sh
123+
124+
# Compare enabled extensions
125+
for PHPV in $(update-alternatives --list php); do echo "$PHPV ..."; colordiff -u <(php7.4 -m) <($PHPV -m); done

webserver/wp-install/wp-cli-run-frontend.php

-24
This file was deleted.

0 commit comments

Comments
 (0)