<VirtualHost *:80>
    ServerName snmp-proxy.local
    DocumentRoot /var/www/switch
    
    # Enable rewrite engine
    <Directory /var/www/switch>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    
    # API endpoint
    Alias /api /var/www/switch/api
    <Directory /var/www/switch/api>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    
    # Enable PHP
    <FilesMatch \.php$>
        SetHandler application/x-httpd-php
    </FilesMatch>
    
    # Error and access logs
    ErrorLog ${APACHE_LOG_DIR}/snmp-proxy_error.log
    CustomLog ${APACHE_LOG_DIR}/snmp-proxy_access.log combined
    
    # Security headers
    Header always set X-Content-Type-Options "nosniff"
    Header always set X-Frame-Options "DENY"
</VirtualHost>

