Adding reverse proxy in nginx

  • I would like to configure nginx to be able to reach all services without adding a port to the IP-number.
    Instead I would like to have it like "192.168.1.196/service1" and have the nginx to reroute that to the port in question.


    I tried to add this in the /etc/nginx/sites-available/default :


    location /sab {
    proxy_pass http://127.0.0.1:8080/;
    }


    But it only gives me a 404.


    So I suspect I need to change more things or I configured the wrong file.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!