ngx pastebin
Author: maksim
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
I'm planning to move my reverse proxy to nginx rather than haproxy that I'm using atm. I use it to put different services outside while only having one public IP by using ACLs.

Here's how I do that in haproxy:

```
frontend https
    mode tcp
    bind *:443

    option              tcplog
    log                 global

    # use tcp content accepts to detects ssl client and server hello.
    tcp-request inspect-delay 5s
    tcp-request content accept if { req_ssl_hello_type 1 }

    # new jitsi
    acl jitsi.wherelinux.xyz_acl req_ssl_sni -i jitsi.wherelinux.xyz
    use_backend jitsi.wherelinux.xyz_backend_443 if jitsi.wherelinux.xyz_acl

```

So we basically make one 443 frontend (making different 443 frontends would cause a weird thing where it just stops working for a few secodns and starts working again afterwards)

And here's how a backend looks:

```
# new jitsi backend start
backend jitsi.wherelinux.xyz_backend_443
        mode tcp
        option tcp-check

        server node ipv.4.ip.address:443 check
# new jitsi backend end
```

Question is: how do I make nginx work similarly? I thought about doing this whole thing cuz nginx is like more supported and haproxy sometimes has some weird bugs which I don't like
Syntax: text | 
Raw |