2025-12-26 10:09:12 -08:00
|
|
|
# Security settings for Multi-User Transcription Server
|
2025-12-26 12:45:23 -08:00
|
|
|
# Compatible with both mod_php and php-fpm
|
2025-12-26 10:09:12 -08:00
|
|
|
|
2025-12-26 15:29:56 -08:00
|
|
|
# IMPORTANT: For Server-Sent Events (SSE) to work with php-fpm, you MUST configure
|
|
|
|
|
# Apache's ProxyTimeout in your virtual host configuration. See apache-sse-config.conf
|
|
|
|
|
# for the required settings. Without this, Apache will timeout SSE connections after
|
|
|
|
|
# 30-60 seconds with a 504 Gateway Timeout error.
|
|
|
|
|
|
2025-12-26 10:09:12 -08:00
|
|
|
# Deny access to config file directly (if accessed via URL)
|
|
|
|
|
<Files "config.php">
|
|
|
|
|
Require all denied
|
|
|
|
|
</Files>
|
|
|
|
|
|
2025-12-26 12:45:23 -08:00
|
|
|
# Deny access to .json data files
|
|
|
|
|
<FilesMatch "\.json$">
|
|
|
|
|
Require all denied
|
|
|
|
|
</FilesMatch>
|
2025-12-26 10:09:12 -08:00
|
|
|
|
|
|
|
|
# Disable directory listing
|
|
|
|
|
Options -Indexes
|
|
|
|
|
|
|
|
|
|
# Enable compression
|
|
|
|
|
<IfModule mod_deflate.c>
|
|
|
|
|
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/json
|
|
|
|
|
</IfModule>
|
|
|
|
|
|
|
|
|
|
# Set MIME types
|
|
|
|
|
AddType application/json .json
|
|
|
|
|
AddType text/event-stream .php
|
2025-12-26 12:45:23 -08:00
|
|
|
|
|
|
|
|
# NOTE: PHP settings (display_errors, upload limits) must be configured in:
|
|
|
|
|
# - For php-fpm: /etc/php/X.X/fpm/pool.d/www.conf or php.ini
|
|
|
|
|
# - For mod_php: Can use php_flag/php_value directives here
|