Re: Proxy both HTTP, and WebSocket traffic to UNIX socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Mittwoch, 28. Dezember 2022, 11:53:58 CET schrieb Jan Kohnert:
> The config reads as:
> 
> ---------------------------------------------------------------------------
> RequestHeader add X-Forwarded-Ssl on
> RequestHeader set X-Forwarded-Proto "https"
> 
> <Proxy *>
>     Require all granted
> </Proxy>
> 
> <Location />
>     ProxyPass unix:///opt/gitlab/gitlab/tmp/sockets/gitlab-workhorse.socket|
> http://127.0.0.1/
>     ProxyPassReverse unix:///opt/gitlab/gitlab/tmp/sockets/gitlab-
> workhorse.socket|http://127.0.0.1/
> </Location>
> 
> <Location /-/cable>
>     ProxyPass unix:///opt/gitlab/gitlab/tmp/sockets/gitlab-workhorse.socket|
> ws://127.0.0.1/-/cable
>     ProxyPassReverse unix:///opt/gitlab/gitlab/tmp/sockets/gitlab-
> workhorse.socket|ws://127.0.0.1/-/cable
> </Location>
> ---------------------------------------------------------------------------

thanks to the help of the GitLab developers, I figured, I was missing 
ProxyPreserveHost. The working configuration including websockets reads as:

---------------------------------------------------------------------------
ProxyPreserveHost on
RequestHeader add X-Forwarded-Ssl on
RequestHeader set X-Forwarded-Proto "https"

<Proxy *>
    Require all granted
</Proxy>

<Location />
    ProxyPass unix:///opt/gitlab/gitlab/tmp/sockets/gitlab-workhorse.socket|
http://127.0.0.1/
    ProxyPassReverse unix:///opt/gitlab/gitlab/tmp/sockets/gitlab-
workhorse.socket|http://127.0.0.1/
</Location>

<Location /-/cable>
    ProxyPass unix:///opt/gitlab/gitlab/tmp/sockets/gitlab-workhorse.socket|
ws://127.0.0.1/-/cable
    ProxyPassReverse unix:///opt/gitlab/gitlab/tmp/sockets/gitlab-
workhorse.socket|ws://127.0.0.1/-/cable
</Location>
---------------------------------------------------------------------------

-- 
MfG Jan



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux