# events is necessary - otherwise the server wont start events {} http { server { # listen on port 80 and 443 for ipv4 and ipv6 requests listen 80; listen [::]:80; # if the requested hostname does match one of the following, check the location block. server_name localhost tbasti2s.l3montree.com tbasti2s.l3montree.education; location / { # always return static files root /www/data; } } server { # listen on port 80 and 443 for ipv4 and ipv6 requests listen 80; listen [::]:80; # if the requested hostname does match one of the following, check the location block. server_name http://miniwhoami-loc1.tbasti2s.l3montree.education; location / { # always return static files proxy_pass http://miniwhoami-loc1; } } server { # listen on port 80 and 443 for ipv4 and ipv6 requests listen 80; listen [::]:80; # if the requested hostname does match one of the following, check the location block. server_name http://miniwhoami-loc2.tbasti2s.l3montree.education; location / { # always return static files proxy_pass http://miniwhoami-loc2; } } server { # listen on port 80 and 443 for ipv4 and ipv6 requests listen 80; listen [::]:80; # if the requested hostname does match one of the following, check the location block. server_name http://echo.tbasti2s.l3montree.education; location / { # always return static files proxy_pass http://echo:5678; } } server { # listen on port 80 and 443 for ipv4 and ipv6 requests listen 80 default; listen [::]:80 default; server_name _; # there is no server name provided here - match anything else location / { # return the error index.html root /www/data/error; } } }