# NailTech Nation - Apache Configuration for Shared Hosting

# Enable Passenger
PassengerEnabled On
PassengerAppRoot /home/yourusername/public_html/nailtech

# Set Python interpreter (update path to match your environment)
PassengerPython /home/yourusername/nailtech_venv/bin/python3

# Set application entry point
PassengerAppType wsgi
PassengerStartupFile passenger_wsgi.py

# Error handling
ErrorDocument 404 /404.html
ErrorDocument 500 /500.html

# Security headers
<IfModule mod_headers.c>
    Header set X-Content-Type-Options "nosniff"
    Header set X-Frame-Options "SAMEORIGIN"
    Header set X-XSS-Protection "1; mode=block"
</IfModule>

# Disable directory listing
Options -Indexes

# Enable gzip compression
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
</IfModule>

# Cache static files
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType image/gif "access plus 1 year"
    ExpiresByType image/png "access plus 1 year"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 month"
</IfModule>

# Protect sensitive files
<FilesMatch "(\.py|\.pyc|\.db|config\.py|requirements\.txt)$">
    Order allow,deny
    Deny from all
</FilesMatch>