# Example apache config for ws.timebank.cc
# This file should be placed in /etc/apache2/sites-available/ws.timebank.cc.conf
# Tested and working with Apache 2.4 and Laravel Reverb Websockets
ServerName ws.timebank.cc
ServerAlias ws.timebank.cc
ServerAdmin admin@timebank.cc
DocumentRoot /var/www/ws.timebank.cc/public
DirectoryIndex index.php index.html index.htm
Require all granted
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
Require all granted
Alias /log/ "/var/log/"
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from all
Require all granted
RewriteEngine on
RewriteCond %{SERVER_NAME} =ws.timebank.cc
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
ServerName ws.timebank.cc
ServerAlias ws.timebank.cc
# Enable all proxy modules
ProxyPreserveHost On
# Proxy WebSocket connections
ProxyPass /app/ ws://127.0.0.1:8080/app/
ProxyPassReverse /app/ ws://127.0.0.1:8080/app/
# Regular HTTP traffic (must come after /app/)
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
# Extended timeouts for WebSockets
ProxyTimeout 3600
TimeOut 3600
# Add these headers to help with WebSocket proxying
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
# ...logs configuration...
LogLevel info proxy:trace5 proxy_wstunnel:trace5
SSLCertificateFile /etc/letsencrypt/live/ws.timebank.cc/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/ws.timebank.cc/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf