Last active
July 9, 2023 17:13
-
-
Save Steffo99/ed6da2b0b2e4d05b0614687494298f21 to your computer and use it in GitHub Desktop.
**VERY OLD AND UNMAINTAINED** · Apache configuration file for Lemmy content aggregator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:443 > | |
# Your server name | |
ServerName example.org | |
ServerAdmin [email protected] | |
# Use HTTPS | |
SSLEngine on | |
# Enable reverse proxy mode | |
ProxyRequests On | |
ProxyTimeout 600 | |
# Proxy pictshare | |
<Location "/pictshare"> | |
ProxyPass http://127.0.0.1:8537/ | |
ProxyPassReverse http://127.0.0.1:8537/ | |
</Location> | |
# Proxy iframely | |
<Location "/iframely"> | |
ProxyPass http://127.0.0.1:8061/ | |
ProxyPassReverse http://127.0.0.1:8061/ | |
</Location> | |
# Proxy Lemmy | |
<Location "/"> | |
ProxyPass http://127.0.0.1:8536/ | |
ProxyPassReverse http://127.0.0.1:8536/ | |
</Location> | |
# Correctly proxy websocket traffic | |
RewriteEngine On | |
RewriteCond %{HTTP:Upgrade} websocket [NC] | |
RewriteRule /(.*) ws://127.0.0.1:8536/$1 [P,L] | |
# Let's Encrypt cert | |
Include /etc/letsencrypt/options-ssl-apache.conf | |
SSLCertificateFile /etc/letsencrypt/live/example.org/fullchain.pem | |
SSLCertificateKeyFile /etc/letsencrypt/live/example.org/privkey.pem | |
</VirtualHost> |
Wait, people are using this super old config?
Does it still work? 😮
Well, we don't need the pictshare and iframely bit (and it wouldn't work anyways, it would have to be after the Lemmy Proxy). And I don't know about the SSL stuff, I have something else doing that for me.
But all in all it works, apart from the bug I mentioned.
It's the first result on Google when trying to find out how to proxy Lemmy on Apache.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should add
ProxyPreserveHost On
. Otherwise you run into LemmyNet/lemmy#3273