Skip to content

Commit bc1dccf

Browse files
authored
Tuning Updates
### 🧹 NGINX MIME AND COMPRESSION CLEANUP - Removed obsolete and irrelevant MIME mappings from `config/etc/nginx/globals/mime-types.conf` for legacy Java Web Start, legacy package formats, and obsolete browser component types. - Kept modern MIME coverage for WordPress-hosted assets while trimming project-irrelevant legacy entries. - Updated `config/etc/nginx/globals/compression-gzip.conf` and `config/etc/nginx/globals/compression-brotli.conf` to remove deprecated compression MIME aliases and legacy dead types. - Aligned gzip and brotli compression type lists to prioritize modern text-based and web-relevant content types. ### 🔧 PHP AND MARIADB TUNING - Updated the logic across the codebase to better optimize the server for a variety of configuration scenarios, including low an high memory environments.
1 parent 29cb50d commit bc1dccf

18 files changed

Lines changed: 255 additions & 214 deletions

.github/ci-config/mariadb-ci.cnf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,5 @@ max_allowed_packet = 16M
6363
[mysql]
6464
#no-auto-rehash
6565

66-
[myisamchk]
67-
key_buffer_size = 16M
68-
sort_buffer_size = 4M
69-
read_buffer = 2M
70-
write_buffer = 2M
71-
7266
[mysqlhotcopy]
7367
interactive-timeout

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ All notable changes to EngineScript will be documented in this file.
44

55
Changes are organized by date, with the most recent changes listed first.
66

7+
## 2026-04-08
8+
9+
### 🧹 NGINX MIME AND COMPRESSION CLEANUP
10+
11+
- Removed obsolete and irrelevant MIME mappings from `config/etc/nginx/globals/mime-types.conf` for legacy Java Web Start, legacy package formats, and obsolete browser component types.
12+
- Kept modern MIME coverage for WordPress-hosted assets while trimming project-irrelevant legacy entries.
13+
- Updated `config/etc/nginx/globals/compression-gzip.conf` and `config/etc/nginx/globals/compression-brotli.conf` to remove deprecated compression MIME aliases and legacy dead types.
14+
- Aligned gzip and brotli compression type lists to prioritize modern text-based and web-relevant content types.
15+
16+
### 🔧 PHP AND MARIADB TUNING
17+
18+
- Updated the logic across the codebase to better optimize the server for a variety of configuration scenarios, including low an high memory environments.
19+
20+
721
## 2026-03-27
822

923
### 🐛 DEBUG MODE ADDED TO ALL INSTALL AND UPDATE SCRIPTS

config/etc/mysql/my.cnf

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ tmpdir = /tmp
2727
lc_messages_dir = /usr/share/mysql
2828
lc_messages = en_US
2929
skip-external-locking
30-
collation-server = utf8mb4_unicode_ci
31-
init-connect='SET NAMES utf8mb4'
30+
collation-server = utf8mb4_uca1400_ai_ci
3231
character_set_client = utf8mb4
32+
character-set-server=utf8mb4
3333
default_storage_engine = InnoDB
3434
performance_schema = OFF
3535

@@ -79,12 +79,14 @@ slow_query_log_file = /var/log/mysql/mariadb-slow.log
7979
#report_host = master1
8080
#auto_increment_increment = 2
8181
#auto_increment_offset = 1
82-
log_bin = /var/log/mysql/mariadb-bin
83-
log_bin_index = /var/log/mysql/mariadb-bin.index
84-
binlog_format = MIXED
82+
# Binary logging disabled by default for single-server setups.
83+
# Enable only when replication or point-in-time recovery is needed:
84+
#log_bin = /var/log/mysql/mariadb-bin
85+
#log_bin_index = /var/log/mysql/mariadb-bin.index
86+
#binlog_format = MIXED
8587
#sync_binlog = 1
86-
binlog_expire_logs_seconds = 604800
87-
max_binlog_size = 100M
88+
#binlog_expire_logs_seconds = 604800
89+
#max_binlog_size = 100M
8890
# slaves
8991
#relay_log = /var/log/mysql/relay-bin
9092
#relay_log_index = /var/log/mysql/relay-bin.index
@@ -138,9 +140,6 @@ max_allowed_packet = 1024M
138140
#no-auto-rehash # faster start of mysql but no tab completion
139141
default-character-set=utf8mb4
140142

141-
[isamchk]
142-
key_buffer = 16M
143-
144143
# * IMPORTANT: Additional settings that can override those from this file!
145144
# The files must end with '.cnf', otherwise they'll be ignored.
146145
!includedir /etc/mysql/conf.d/

config/etc/nginx/globals/compression-brotli.conf

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,29 @@ brotli_window 512k;
1414
brotli_types
1515
application/atom+xml
1616
application/geo+json
17-
application/javascript
1817
application/json
1918
application/ld+json
2019
application/manifest+json
2120
application/rdf+xml
2221
application/rss+xml
2322
application/vnd.ms-fontobject
23+
application/vnd.apple.mpegurl
2424
application/wasm
25-
application/x-javascript
26-
application/x-web-app-manifest+json
2725
application/xhtml+xml
2826
application/xml
29-
font/eot
27+
application/xslt+xml
3028
font/otf
29+
font/sfnt
3130
font/ttf
3231
image/bmp
3332
image/svg+xml
3433
image/x-icon
35-
text/cache-manifest
3634
text/calendar
3735
text/css
36+
text/csv
3837
text/javascript
3938
text/markdown
4039
text/plain
40+
text/xml
4141
text/vcard
42-
text/vnd.rim.location.xloc
43-
text/vtt
44-
text/x-component
45-
text/x-cross-domain-policy;
42+
text/vtt;

config/etc/nginx/globals/compression-gzip.conf

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,29 @@ gzip_vary on;
1313
gzip_types
1414
application/atom+xml
1515
application/geo+json
16-
application/javascript
1716
application/json
1817
application/ld+json
1918
application/manifest+json
2019
application/rdf+xml
2120
application/rss+xml
2221
application/vnd.ms-fontobject
22+
application/vnd.apple.mpegurl
2323
application/wasm
24-
application/x-javascript
25-
application/x-web-app-manifest+json
2624
application/xhtml+xml
2725
application/xml
28-
font/eot
26+
application/xslt+xml
2927
font/otf
28+
font/sfnt
3029
font/ttf
3130
image/bmp
3231
image/svg+xml
33-
image/vnd.microsoft.icon
3432
image/x-icon
35-
text/cache-manifest
3633
text/calendar
3734
text/css
35+
text/csv
3836
text/javascript
3937
text/markdown
4038
text/plain
4139
text/xml
4240
text/vcard
43-
text/vnd.rim.location.xloc
44-
text/vtt
45-
text/x-component
46-
text/x-cross-domain-policy;
41+
text/vtt;

config/etc/nginx/globals/map-expires.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ map $sent_http_content_type $expires {
2929
~*text/calendar epoch;
3030

3131
# JavaScript
32-
~*application/javascript 1y;
33-
~*application/x-javascript 1y;
32+
~*application/javascript 30d;
33+
~*application/x-javascript 30d;
3434
~*text/javascript 30d;
3535

3636

config/etc/nginx/globals/mime-types.conf

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ types {
1818

1919
# Web Fonts
2020
application/vnd.ms-fontobject eot;
21-
application/font-sfnt sfnt;
21+
font/sfnt sfnt;
2222
font/collection ttc;
2323
font/otf otf;
2424
font/ttf ttf;
@@ -33,12 +33,10 @@ types {
3333
audio/wav wav;
3434
audio/webm weba;
3535
audio/x-matroska mka;
36-
audio/x-realaudio ra;
3736

3837
# Images
3938
image/apng apng;
40-
image/avif avif;
41-
image/avif-sequence avifs;
39+
image/avif avif avifs;
4240
image/bmp bmp;
4341
image/gif gif;
4442
image/heic heic;
@@ -52,7 +50,6 @@ types {
5250
image/vnd.wap.wbmp wbmp;
5351
image/webp webp;
5452
image/x-icon cur ico;
55-
image/x-jng jng;
5653

5754
# Video
5855
video/3gpp 3gp 3gpp;
@@ -62,17 +59,13 @@ types {
6259
video/ogg ogv;
6360
video/quicktime mov;
6461
video/webm webm;
65-
video/x-flv flv;
66-
video/x-mng mng;
6762
video/x-ms-asf asx asf;
6863
video/x-ms-wmv wmv;
6964
video/x-msvideo avi;
7065
video/x-matroska mk3d mkv;
7166

7267
# Archive & Compressed Files
7368
application/java-archive ear jar war;
74-
application/x-java-archive-diff jardiff;
75-
application/vnd.android.package-archive apk;
7669
application/vnd.bzip3 bz3;
7770
application/vnd.rar rar;
7871
application/x-7z-compressed 7z;
@@ -91,51 +84,32 @@ types {
9184
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
9285

9386
# Adobe Suite
94-
application/illustrator ai;
95-
application/pdf pdf;
87+
application/pdf ai pdf;
9688
application/postscript eps ps;
9789
image/vnd.adobe.photoshop psb psd;
9890

9991
# Manifest
10092
application/manifest+json webmanifest;
101-
application/x-web-app-manifest+json webapp;
102-
text/cache-manifest appcache;
103-
text/cache.manifest manifest;
10493

10594
# Other
10695
application/epub+zip epub;
107-
application/mac-binhex40 hqx;
10896
application/octet-stream bin deb dll dmg exe img iso mcstructure mcworld msi msm msp proto safariextz;
10997
application/rtf rtf;
11098
application/vnd.amazon.ebook azw;
111-
application/vnd.apple.installer+xml mpkg;
11299
application/vnd.apple.mpegurl m3u8;
113100
application/vnd.google-earth.kml+xml kml;
114101
application/vnd.google-earth.kmz kmz;
115-
application/vnd.wap.wmlc wmlc;
116102
application/vnd.oasis.opendocument.graphics odg;
117103
application/vnd.oasis.opendocument.presentation odp;
118104
application/vnd.oasis.opendocument.spreadsheet ods;
119105
application/vnd.oasis.opendocument.text odt;
120106
application/x-abiword abw;
121-
application/x-bb-appworld bbaw;
122107
application/x-bittorrent torrent;
123108
application/x-cdf cda;
124-
application/x-chrome-extension crx;
125-
application/x-cocoa cco;
126109
application/x-freearc arc;
127-
application/x-java-jnlp-file jnlp;
128-
application/x-makeself run;
129-
application/x-opera-extension oex;
130110
application/x-perl pl pm;
131-
application/x-pilot pdb prc;
132-
application/x-redhat-package-manager rpm;
133-
application/x-sea sea;
134-
application/x-shockwave-flash swf;
135-
application/x-stuffit sit;
136111
application/x-tcl tcl tk;
137112
application/x-x509-ca-cert crt der pem;
138-
application/x-xpinstall xpi;
139113
application/xhtml+xml xhtml;
140114
application/xslt+xml xsl;
141115
application/xspf+xml xspf;
@@ -145,9 +119,5 @@ types {
145119
text/mathml mml;
146120
text/plain txt;
147121
text/vcard vcard vcf;
148-
text/vnd.rim.location.xloc xloc;
149-
text/vnd.sun.j2me.app-descriptor jad;
150-
text/vnd.wap.wml wml;
151122
text/vtt vtt;
152-
text/x-component htc;
153123
}

config/etc/nginx/ssl/sslshared.conf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ssl_conf_command Options KTLS;
44
ssl_dhparam /etc/nginx/ssl/dhe/ffdhe2048.pem;
55
ssl_ecdh_curve X25519:P-256:P-384;
66
ssl_prefer_server_ciphers off;
7-
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
7+
ssl_protocols TLSv1.2 TLSv1.3;
88
ssl_reject_handshake off;
99
ssl_session_cache shared:SSL:5m;
1010
ssl_session_tickets on;
@@ -20,10 +20,6 @@ ssl_stapling_verify off;
2020
# SSL Early Data
2121
proxy_set_header Early-Data $ssl_early_data;
2222

23-
# HSTS (31536000 seconds = 1 year)
24-
# Check your domain at https://hstspreload.org/
25-
add_header Strict-Transport-Security "max-age=63072000; preload" always;
26-
2723
# References:
2824
# https://ssl-config.mozilla.org/#server=nginx&version=1.25.1&config=intermediate&openssl=3.2.0&guideline=5.7
2925
# https://wiki.mozilla.org/Security/Server_Side_TLS

0 commit comments

Comments
 (0)