Skip to content

Instantly share code, notes, and snippets.

@jgillula
Created October 30, 2022 06:01
Show Gist options
  • Save jgillula/7211783ae4908f3aafeee47b77a28a00 to your computer and use it in GitHub Desktop.
Save jgillula/7211783ae4908f3aafeee47b77a28a00 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
# This is a minimal configuration to get Apache to work as a reverse proxy for paperless-ngx
# Tested on paperless-ngx 1.8.0 running in a Docker container
# and apache 2.4.52 running on Ubuntu Jammy 22.04.1 LTS
ServerName servername
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass / http://localhost:8000/
ProxyPassReverse / http://localhost:8000/
ProxyRequests off
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://localhost:8000/$1" [P,L]
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment