This commit modifies the Apache configuration to reflect that Socket.IO now runs directly on HTTPS port 3051, eliminating the need for Apache proxying. Additionally, the backend server setup is updated to create an HTTPS server for Socket.IO, including error handling for SSL certificate loading. The frontend service is also adjusted to connect to the new HTTPS endpoint, ensuring compatibility with the updated architecture.
45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
# Apache-Konfiguration für tt-tagebuch.de mit WebSocket-Support
|
|
#
|
|
# WICHTIG: Folgende Module müssen aktiviert sein:
|
|
# sudo a2enmod proxy
|
|
# sudo a2enmod proxy_http
|
|
# sudo a2enmod proxy_wstunnel
|
|
# sudo a2enmod rewrite
|
|
# sudo a2enmod headers
|
|
# sudo systemctl restart apache2
|
|
|
|
<VirtualHost *:443>
|
|
ServerName tt-tagebuch.de
|
|
ServerAlias www.tt-tagebuch.de
|
|
|
|
DocumentRoot /var/www/tt-tagebuch.de
|
|
|
|
<Directory /var/www/tt-tagebuch.de>
|
|
Options Indexes FollowSymLinks
|
|
AllowOverride All
|
|
Require all granted
|
|
</Directory>
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/tt-tagebuch.de_error.log
|
|
CustomLog ${APACHE_LOG_DIR}/tt-tagebuch.de_access.log combined
|
|
|
|
SSLEngine on
|
|
SSLCertificateFile /etc/letsencrypt/live/tt-tagebuch.de/fullchain.pem
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/tt-tagebuch.de/privkey.pem
|
|
Include /etc/letsencrypt/options-ssl-apache.conf
|
|
|
|
ProxyRequests Off
|
|
|
|
# HINWEIS: Socket.IO läuft jetzt direkt auf HTTPS-Port 3051 (nicht über Apache-Proxy)
|
|
# Siehe backend/SOCKET_IO_SSL_SETUP.md für Details
|
|
|
|
# API-Routen
|
|
ProxyPass /api http://localhost:3050/api
|
|
ProxyPassReverse /api http://localhost:3050/api
|
|
|
|
# Alle anderen Anfragen an den Backend-Server (für Frontend)
|
|
ProxyPass / http://localhost:3050/
|
|
ProxyPassReverse / http://localhost:3050/
|
|
</VirtualHost>
|
|
|