This repository was archived by the owner on Oct 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 187
Apache reverse proxy
silverwind edited this page Apr 10, 2016
·
13 revisions
Below is an example virtual host configuration for an Apache 2.4 reverse proxy for droppy. Make sure that the following modules are loaded:
mod_sslmod_rewritemod_proxymod_proxy_wstunnel
Additional tuning like in the nginx configuration might be necessary to make long-running uploads work correctly.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName droppy.example.com
Redirect permanent / https://droppy.example.com/
</VirtualHost>
NameVirtualHost *:443
<VirtualHost *:443>
ServerName droppy.example.com
ErrorLog /var/log/httpd/droppy-error.log
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/droppy.example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/droppy.example.com/privkey.pem
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/ [NC]
RewriteCond %{QUERY_STRING} socket [NC]
RewriteRule /(.*) ws://127.0.0.1:8989/$1 [P,L]
ProxyPass / http://127.0.0.1:8989/
ProxyPassReverse / http://127.0.0.1:8989/
</VirtualHost>