Initial commit
This commit is contained in:
69
ws.timebank.cc.conf.example
Normal file
69
ws.timebank.cc.conf.example
Normal file
@@ -0,0 +1,69 @@
|
||||
# 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
|
||||
|
||||
<VirtualHost *:80>
|
||||
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
|
||||
|
||||
<Directory /var/www/ws.timebank.cc/public/>
|
||||
Require all granted
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride all
|
||||
Order allow,deny
|
||||
allow from all
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
Alias /log/ "/var/log/"
|
||||
<Directory "/var/log/">
|
||||
Options Indexes MultiViews FollowSymLinks
|
||||
AllowOverride None
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from all
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
RewriteEngine on
|
||||
RewriteCond %{SERVER_NAME} =ws.timebank.cc
|
||||
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
||||
</VirtualHost>
|
||||
|
||||
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName ws.timebank.cc
|
||||
ServerAlias ws.timebank.cc
|
||||
|
||||
# Enable all proxy modules
|
||||
<IfModule mod_proxy.c>
|
||||
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/
|
||||
</IfModule>
|
||||
|
||||
# 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
|
||||
</VirtualHost>
|
||||
Reference in New Issue
Block a user