<IfModule security2_module>
- # Default Debian dir for modsecurity's persistent data
- SecDataDir /var/cache/modsecurity
+ # Default Debian dir for modsecurity's persistent data
+ SecDataDir /var/cache/modsecurity
- # Include all the *.conf files in /etc/modsecurity.
- # Keeping your local configuration in that directory
- # will allow for an easy upgrade of THIS file and
- # make your life easier
- IncludeOptional /etc/modsecurity/*.conf
+ # Include all the *.conf files in /etc/modsecurity.
+ # Keeping your local configuration in that directory
+ # will allow for an easy upgrade of THIS file and
+ # make your life easier
+ IncludeOptional /etc/modsecurity/*.conf
- # Include OWASP ModSecurity CRS rules if installed
- IncludeOptional /usr/share/modsecurity-crs/*.load
+ # --- OWASP Core Rule Set (CRS) の読み込み ---
+
+ # 1. CRSのセットアップファイルを読み込む(必須)
+ IncludeOptional /usr/share/modsecurity-crs/coreruleset/crs-setup.conf
+
+ # 2. CRSのルールファイルを読み込む
+ # パフォーマンス問題を起こすSQLデータ漏洩検知ルールを除外
+ IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/REQUEST-*.conf
+ IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-950-DATA-LEAKAGES.conf
+ IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-952-DATA-LEAKAGES-JAVA.conf
+ IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-953-DATA-LEAKAGES-PHP.conf
+ IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-954-DATA-LEAKAGES-IIS.conf
+ IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-959-BLOCKING-EVALUATION.conf
+ IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-980-CORRELATION.conf
+ IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf
→ 修正後のsecurity2.conf全文
<IfModule security2_module>
# Default Debian dir for modsecurity's persistent data
SecDataDir /var/cache/modsecurity
# Include all the *.conf files in /etc/modsecurity.
# Keeping your local configuration in that directory
# will allow for an easy upgrade of THIS file and
# make your life easier
IncludeOptional /etc/modsecurity/*.conf
# --- OWASP Core Rule Set (CRS) の読み込み ---
# 1. CRSのセットアップファイルを読み込む(必須)
IncludeOptional /usr/share/modsecurity-crs/coreruleset/crs-setup.conf
# 2. CRSのルールファイルを読み込む
# パフォーマンス問題を起こすSQLデータ漏洩検知ルールを除外
IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/REQUEST-*.conf
IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-950-DATA-LEAKAGES.conf
IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-952-DATA-LEAKAGES-JAVA.conf
IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-953-DATA-LEAKAGES-PHP.conf
IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-954-DATA-LEAKAGES-IIS.conf
IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-959-BLOCKING-EVALUATION.conf
IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-980-CORRELATION.conf
IncludeOptional /usr/share/modsecurity-crs/coreruleset/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf
</IfModule>
; Note: This value is mandatory.
-pm.max_children = 5
+pm.max_children = 15
; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic'
; Default Value: (min_spare_servers + max_spare_servers) / 2
-pm.start_servers = 2
+pm.start_servers = 4
; The desired minimum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
-pm.min_spare_servers = 1
+pm.min_spare_servers = 2
; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
-pm.max_spare_servers = 3
+pm.max_spare_servers = 6
; The number of rate to spawn child processes at once.
; Note: Used only when pm is set to 'dynamic'
Japanese anime / manga style illustration, (maximum moe-style:1.7), (ultra-detailed:1.6), (dramatic contrast between traditional Japanese study room and holographic terminal commands:1.5), (a giant, aged scroll (Makimono) unrolled, with neon-green shell script flowing across its surface:1.6), (atmospheric illumination from the flowing script and floating "$ " prompts:1.4), (standard lens perspective:1.3), (smooth, natural visual composition:1.2), 16:9, widescreen
THRUST_WEIGHT = 1.7 // Thigh emphasis weight for "Stable Foundation of Automation" (1.5 - 2.0 recommended)
// CORE VARIABLES (Optimized for Shell Script Makimono)
HAIR_COLOR = (Matte, deep charcoal or sleek jet black, styled with elegant, traditional rope braids:1.5) // Traditional yet structured.
HAIR_ACCENT = (Kanzashi designed as a delicate, glowing '$ ' (prompt symbol) icon and a miniature sealing stamp:1.7), (Thin pure white and neon-green braided cord decoration:1.4).
GLASSES_STYLE = (Thin, antique metallic-rimmed glasses, reflecting the complex, flowing script logic:1.6) // Glasses for deep analysis.
OUTFIT_BASE_COLOR = (Structured, deep matte indigo or black Kimono-inspired functional wear:1.5) // Elegant and non-distracting color.
EMBROIDERY_COLOR = Neon-green and vibrant orange (CUI commands and variable names:1.4).
HOSIERY_COLOR = Sheer matte black or opaque deep indigo (smooth, functional texture, with subtle glowing lines resembling command pipes:1.6) // Pipe/Flow lines.
// CONSTRAINT & FOCUS (Filter Mitigation & Execution Focus)
Constraint: (Healthy and dignified, intellectual and deeply focused aesthetic only:1.5), (No offensive or sexually explicit content:1.5), (Focus on automation flow and scripting mastery:1.5).
Focus: (Maximum emphasis on the glowing script text on the scroll:1.8), (Fingers delicately touching the scroll, suggesting script execution:1.6), (The elegant, powerful curve of the upper thighs as a stable base for the command flow:THRUST_WEIGHT).
---
// **LETTERING (Shell Script Title - Execution Command)**
(Large, powerful, and perfectly aligned lettering of the words 'Shell Script' projected as glowing, neon-green commands directly over the center of the unrolled Makimono scroll:1.7), (Strict, mono-spaced terminal font, suggesting code precision and execution integrity:1.5), (The letters feature subtle internal segments that resemble pipe operators '|' and glowing '$' prompt symbols at the start of the word, all in neon green:1.6), (Holographic projection effect with sharp, clean edges and intense neon-green internal illumination, contrasting with the parchment texture:1.5), (Intensely illuminated by its own neon-green light, casting sharp, digital-looking reflections onto the aged parchment and the character's clothing:1.4)
---
// PERSPECTIVE, COMPOSITION, & POSE (Filter Safe & Execution Focus)
Perspective: (Medium-low angle perspective:1.5), emphasizing the grandeur of the unrolled scroll.
Framing: (Full body visible, seated in front of a low, sturdy wooden desk/platform:1.4), (**Framed by the subtle texture of a traditional shoji screen and the ancient wooden desk:1.3**).
PoseAction: (**Seated in a calm, focused posture (正座 or 片膝立ち), both hands gently holding the edges of the unrolled giant Makimono:1.7**), (**One finger or a traditional brush hovering over a glowing line of code, suggesting activation or modification:1.6**). // Scripting/Chanting pose.
Expression: (Intense concentration, a calm yet satisfied gaze as the script logic unfolds:1.5).
---
// SETTING & CYBER DETAILS
Location: (**A quiet, traditional Japanese study room (書斎) with a low, dark wooden desk:1.5**), (**The air is filled with subtle, swirling smoke or vapor, suggesting powerful computation:1.6**).
Decorations: (**A massive, aged parchment scroll unrolled, filled with glowing neon-green and orange shell script commands:1.7**), (**Holographic '$ ' prompts floating in the air like dust motes:1.5**), (A traditional inkstone and brush (筆) resting nearby:1.4).
Atmosphere: (Mysterious, powerful, and deeply focused, the magic of automation:1.2).
Details: (**The intense neon light from the script reflects dramatically off the character's face and the glossy hosiery:1.7**), (The contrast between the fragile parchment/wood and the powerful digital light:1.5).
---
// OUTFIT & ACCESSORIES (Automation Modules)
Outfit: (Kimono-inspired functional scholar's robes:1.4) (base=**OUTFIT_BASE_COLOR**, embroidery color=**EMBROIDERY_COLOR**, motif=flowing script/logic gates), (clean, structured, and matte texture:1.5).
Leg Wear: (**HOSIERY_COLOR** tights/leggings with subtle, pipe-like seams:1.6), (modular thigh strap designed as a scroll tie/seal, with a glowing 'for loop' icon charm:1.5).
Accessories: Minimalist choker designed as a logic gate circuit:1.3, A small, portable, clear glass sphere containing a perfectly ordered 'history' log:1.5.
---
// NEGATIVE PROMPTS (General)
(extra fingers:1.8), (fewer fingers:1.8), (malformed hands:1.8), (extra limbs:1.8), (mutated hands:1.8), (bad anatomy:1.5), (disfigured:1.5), (ugly:1.5), (deformed:1.5), (blurry:1.3), (duplicate:1.3), (morbid:1.2), (mutilated:1.2), (out of frame:1.2), (bad proportion:1.2), (bad quality:1.2), (overly sensual:1.5), (crotch_focus:1.5), (nipples:1.5), (vagina:1.5), (too much skin:1.5).