Routes

Setting a route from the listen to the target.

A route is a path from the input (Listen) to the destination. The destination can be of different types, stream, HTTP/HTTPS, SSH, use.

With the help of the graphic from Listen I would like to show the area controlled by the route again:

Routes List

  1. The new creation and loading of the configuration of the nginx (all Listen, Routes, etc.) can be triggered again manually at any time.

Existing connections are kept as if running the command: nginx -s reload

  1. The first thing to see in the Routes list are the default routes. If no route is specified, the default routes always apply.

  2. Each domain entered in Domains is displayed under Routes. One or more routes from one or more Listen to a destination can now be entered.

Default Routes

The default Routes are installed at the beginning of the setup. These routes are the default path if no domain or protocol split takes effect beforehand.

The default routes cannot be edited or deleted.

  1. The listen stream on port 53 points to FlyingFish's internal DNS server (this lists on port 5333 so that nginx can get port 53).

  2. The listen stream on port 443 points to the internal HTTPS service with port 10443. HTTPS connections are handled with certificates.

  3. The listen stream on port 80 points to the internal HTTP service, no encryption with a certificate is used.

If set for listening, the IP access blacklist/whitelist takes effect.

The yellow "P" can also be seen on point 2 and 3. It indicates that the connection with Proxy protocol is activated. On the target side you can see the "P" with an arrow pointing down. It shows that the Proxy protocol is removed again.

If no P with an arrow appears at the destination, the Proxy protocol will be passed on to the remote server! This remote server must expect the Proxy protocol, otherwise it will not understand this connection!

Add Stream/Route

  1. If the two domains example.com and sub1.example.com are created under Domains, we can now see them in Routes.

  2. Adding a Stream or HTTP/HTTPs route can be clicked in the context menu on the right, per domain. A domain can have multiple Streams or HTTP/HTTPs routes.

Add Stream

  1. Tabs: The tabs offer targeted setting options for the stream. Depending on the destination type (6.), the tabs expand with more setting options.

  2. Domain Name/IP: Here we can see again which domain we are adding the stream to.

  3. Listen: Which Listen entry our route accesses/acts to can be selected here.

  4. Index: The index indicates the order in which our routes are sorted. 0 would come first, with all higher numbers following downwards. This may be necessary if a route has a higher priority. If there is no priority, this field can be left empty.

  5. Alias-Name (Intern): A name used internally in the Nginx config. The name helps when checking the config. But can be left empty because it is generated automatically.

  6. Destination-Type: The type of target changes depending on the selection above the tab (under 1.) with further settings.

Stream Destination-Type

IP/Host direct (Stream)

  1. IP/Host direct (Stream) adds a new tab where upstreams can be added.

  2. An upstream can be added here.

  1. #: ID of the upstream, purely informative

  2. Deletes the upstream entry.

  3. Address: Destination IP address to which the requests are forwarded.

  4. Port: Specification of which port the destination has.

  5. Proxy protocol out: Activation removes the Proxy protocol header. In the routes list it is indicated with "P".

  6. The second upstream added as an example. If upstream 1 with IP 192.168.178.1 cannot be reached, upstream 2 with IP 192.168.178.2 is used.

Intern Listen

  1. The destination type Intern Listen (Http/Https) adds the Listen tab.

  2. The Listen for Internal are now available for selection.

It only makes sense to set this internal listen in the stream if you have added a new custom internal listen (Http/Https) service under Listen, deviating from the already supplied 10443 port or 10080 port. If you remember, there are default routes that take the path from the stream to HTTP/HTTPs from port 443 and 80. Therefore, you do not have to specify this path yourself!

Add HTTP/HTTPS

Last updated