We can no longer ignore there are Matrix users among our editorship, who prefer it over Discord for various reasons, some being they had to use VPN, they prefer Matrix for privacy and security, or simply because they hate Discord for some reason

There’s also the problem our organization is currently intrinsically tied with Discord. So if we ever “found” to “break the rules” of the “community guidelines,” which is always a bullshit excuse for censorship, we will face a major setback in our organization before we re-organize ourselves more autonomously.

Having a Matrix server and channels neatly organized can be a safe backup from such a setback, but the major reason we (and by this I mean mostly myself) are currently researching into implementing a Matrix server, is to host a bridge which would allow seamless communication between our Matrix and Discord members

Comrade @[email protected] from GenZedong has generously offered support in implementing the server, but neither of us knew how to configure the Apache webserver, which is the stack used by ProleWiki, and I’m currently stuck figuring this out. She has also set up a Matrix-Discord bridge herself for us to use, but it’s safer for us to host one ourselves, to avoid leaving the server dependent on other servers.

Instead of requesting for a single person, anyone willing to help, please do so in the comments, and I’ll answer you. I will share some information about our server configuration in the process, and since any conversation here is public, try not to ask any sensitive information.

I think this way more people can chime in and help us out, I’ve been having headaches with this 🥲

    • loathsome dongeater@lemmygrad.ml
      link
      fedilink
      English
      arrow-up
      6
      ·
      9 months ago

      Need help with the Apache config? I can chat with you on matrix to figure out the problem. You are supposed to set up a reverse proxy and not a redirect. I only have experience with nginx and caddy but could Google how to do it on Apache.

    • Camarada Forte@lemmygrad.mlOPM
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      9 months ago

      This is the Apache config @[email protected] @[email protected] @[email protected] :

      <VirtualHost *:80>
      	ServerName matrix.prolewiki.org
      	ServerAdmin webmaster@localhost
      
      	ErrorLog ${APACHE_LOG_DIR}/matrix.log
      	CustomLog ${APACHE_LOG_DIR}/matrix_access.log combined
      
      	RewriteEngine on
      	RewriteCond %{SERVER_NAME} =matrix.prolewiki.org
      	RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
      </VirtualHost>
      
      <IfModule mod_ssl.c>
      <VirtualHost *:443 *:8448>
      	SSLEngine on
      	ServerName matrix.prolewiki.org
      
      	ErrorLog ${APACHE_LOG_DIR}/matrix.log
      	CustomLog ${APACHE_LOG_DIR}/matrix_access.log combined
      
      	Include /etc/letsencrypt/options-ssl-apache.conf
      
      	RequestHeader set "X-Forwarded-Proto"expr=%{REQUEST_SCHEME}
      	ProxyPreserveHost On
      	ProxyPass "/_matrix/identity" "http://localhost:8090/_matrix/identity"
      	ProxyPass "/_matrix" "http://localhost:8008/_matrix"nocanon
      
      	<Location /.well-known/matrix/server>
      		ErrorDocument 200 '{"m.server": "matrix.prolewiki.org"}'
      		Redirect 200 /
      		Header always set Content-Type application/json
      		Header always set Access-Control-Allow-Origin *
      	</Location>
      	<Location /.well-known/matrix/client>
      		ErrorDocument 200 '{"m.homeserver": {"base_url": "https://matrix.prolewiki.org" } }'
      		Redirect 200 /
      		Header always set Content-Type application/json
      		Header always set Access-Control-Allow-Origin *
      	</Location>
      	SSLCertificateFile /etc/letsencrypt/live/prolewiki.org/fullchain.pem
      	SSLCertificateKeyFile /etc/letsencrypt/live/prolewiki.org/privkey.pem
      </VirtualHost>
      </IfModule>
      
      • So far as I can tell, there isn’t anything that looks wrong. I copied the RequestHeader, ProxyPreserveHost and ProxyPass “_matrix” parts to local and it worked fine. The rest either doesn’t matter when it comes to /_matrix or don’t look wrong. You have an error log I can see, can you provide them (removing anything that shouldn’t be public)

        • Camarada Forte@lemmygrad.mlOPM
          link
          fedilink
          arrow-up
          1
          ·
          9 months ago

          I found a recurring message in the error log:

          [Sat Feb 24 02:21:57.081476 2024] [proxy:warn] [pid 614188] [client 213.32.242.176:47708] AH01144: No protocol handler was valid for the URL /_matrix (scheme 'http'). If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
          [Sat Feb 24 02:29:39.507804 2024] [proxy:warn] [pid 615347] [client 213.32.242.176:2635] AH01144: No protocol handler was valid for the URL /_matrix/static/ (scheme 'http'). If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
          

          etc.