NGINX to Traefik translator

Many examples of how to configure the reverse proxy to make the service fully operational server are based on NGINX.

To ease the migration it would help if there are examples of the most common NGINX configuration and how Traefik handles this or can be configured to do the same, respectively.
The only thing I could find is

I start with the snippet below, contributions are welcome.

server {
	listen 80; listen [::]:80;
	server_name;  # <-- change this

	location / {
		proxy_pass http://unix:/...nginx.http.sock:;
		proxy_set_header Host $http_host;
		proxy_http_version 1.1;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
		proxy_set_header X-Real-IP $remote_addr;

1:1 config in Traefik:

## Static configuration
## Dynamic configuration
http.routersRouter-NGINX.rule =  "Host(``)"
http.routersRouter-NGINX.entryPoints = port80_web

Explaiend in Detail:

in Mattermost behind Treafik v2 I mentioned

how to define variables like $scheme $remote_addr in traefik v2 header middlewares?


request scheme, โ€œ `http` โ€ or โ€œ `https` โ€

that would be

the closest I can find is

1 Like