You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FastAPI backend for a voice assistant system based on ESP32S3-Box-3. Handles two types of clients: ESP32 devices (local network) and a webapp (public access via reverse proxy).
<VirtualHost*:80>
ServerName your.domain
RewriteEngineOnRewriteRule^https://%{HTTP_HOST}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<IfModulemod_ssl.c>
<VirtualHost*:443>
ServerName your.domain
# Webapp (static files)ProxyPass /alexa/ http://backend.vpn/alexa/
ProxyPassReverse /alexa/ http://backend.vpn/alexa/
# Public API (auth enforced on FastAPI side)ProxyPass /api/public/ http://backend.vpn:8080/api/public/
ProxyPassReverse /api/public/ http://backend.vpn:8080/api/public/
# WebSocket for webapp (token in query string)RewriteEngineOnRewriteCond%{HTTP:Upgrade}websocket [NC]
RewriteRule^/ws/public$ws://backend.vpn:8080/ws/public [P,L]
SSLCertificateFile /etc/letsencrypt/live/your.domain/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/your.domain/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
ErrorLog /var/log/apache2/alexa-error.log
CustomLog /var/log/apache2/alexa-access.log combined
</VirtualHost>
</IfModule>
Internal endpoints (/ws/internal, /api/internal/*, /firmware/*) intentionally have no proxy entries — accessible only from the local network directly on port 8080.