# File server configuration for game server file downloads
ServerName files.yourdomain.com
ServerAlias files.*
# Document root points to the file server directory
# Change this path to your actual file server location
DocumentRoot /var/www/fileserver
# Directory configuration
Options +Indexes +FollowSymLinks
AllowOverride None
Require all granted
# Enable directory browsing with custom index
DirectoryIndex index.html index.php
# Fancy indexing for better file browsing
IndexOptions FancyIndexing HTMLTable VersionSort NameWidth=* DescriptionWidth=*
IndexOrderDefault Descending Date
# Add descriptions for common file types
AddDescription "Game Server Files" *.zip *.tar.gz *.rar
AddDescription "Configuration File" *.cfg *.ini *.conf
AddDescription "Script File" *.sh *.bat
AddDescription "Text Document" *.txt *.md
# Set icons for file types
AddIconByType (TXT,/icons/text.png) text/*
AddIconByType (IMG,/icons/image2.png) image/*
AddIcon /icons/compressed.png .zip .tar .gz .rar .7z
AddIcon /icons/script.png .sh .bat .ps1
# Prevent execution of scripts in upload directories
Require all denied
# Set proper MIME types
AddType application/octet-stream .zip .tar .gz .rar .7z
AddType text/plain .txt .log .cfg .ini .conf
# Enable large file downloads
LimitRequestBody 0
# Error and access logs
ErrorLog ${APACHE_LOG_DIR}/fileserver-error.log
CustomLog ${APACHE_LOG_DIR}/fileserver-access.log combined
# Security headers
Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options "SAMEORIGIN"
# Compression for text files
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
# Cache static files
ExpiresActive On
ExpiresDefault "access plus 1 week"
# Optional: Bandwidth limiting (requires mod_bw or similar)
# Uncomment and adjust as needed
#
# BandWidthModule On
# ForceBandWidthModule On
# BandWidth all 512000
# MinBandWidth all 50000
#
# SSL/HTTPS configuration (uncomment and configure after obtaining SSL certificate)
#
# ServerName files.yourdomain.com
# ServerAlias files.*
#
# DocumentRoot /var/www/fileserver
#
# SSLEngine on
# SSLCertificateFile /etc/ssl/certs/files.yourdomain.com.crt
# SSLCertificateKeyFile /etc/ssl/private/files.yourdomain.com.key
# SSLCertificateChainFile /etc/ssl/certs/ca-bundle.crt
#
#
# Options +Indexes +FollowSymLinks
# AllowOverride None
# Require all granted
# DirectoryIndex index.html index.php
# IndexOptions FancyIndexing HTMLTable VersionSort NameWidth=* DescriptionWidth=*
# IndexOrderDefault Descending Date
#
#
#
#
# Require all denied
#
#
#
# ErrorLog ${APACHE_LOG_DIR}/fileserver-ssl-error.log
# CustomLog ${APACHE_LOG_DIR}/fileserver-ssl-access.log combined
#
#
# Header always set X-Content-Type-Options "nosniff"
# Header always set X-Frame-Options "SAMEORIGIN"
# Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
#
#