Apache2 ReverseProxy

Alright, I’m looking into setting this up but I don’t see an Apache Proxy config file anywhere. I am not an Apache Guru, is there a simple example out there somewhere i’m not seeing?
I’ve found one for mattermost no problem, would this work?

<VirtualHost *:80>

If you’re not using a subdomain you may need to set a ServerAlias to:

ServerAlias www. mydomain .com

ServerName mysubdomain .mydomain .com
ServerAdmin hostmaster@ mydomain .com
ProxyPreserveHost On

Set web sockets

RewriteEngine On
RewriteCond %{REQUEST_URI} /api/v[0-9]+/(users/)?websocket [NC,OR]
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC,OR]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
RewriteRule .* ws://127.0.0.1:8065%{REQUEST_URI} [P,QSA,L]

Require all granted ProxyPass http://127.0.0.1:8065/ ProxyPassReverse http://127.0.0.1:8065/ ProxyPassReverseCookieDomain 127.0.0.1 mysubdomain.mydomain.com

I added spaces so the forum would allow the posting.

https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html

Your ProxyPass commands are missing locations.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.