
Ich habe eine Instanz von JBoss und eine Instanz von Jetty auf demselben Server, also dieselbe IP, eine ist auf Port 8180, eine auf 8280. Ich plane, Nginx auf Port 80 einzurichten. Ist es möglich, Daten basierend auf der URL an eine der beiden zu routen? Wie IP/Jboss und IP/Jetty und den Verkehr an eine der beiden zu routen?
Antwort1
Ja, Sie können nginx verwendenHttpProxyModuleZuProxy-Passwortbasierend auf dem Standort, z. B.
location /jboss/ {
proxy_pass http://yourhost.tld:8180;
}
location /jetty/ {
proxy_pass http://ip.add.re.ss:8280;
}