© CCFOUND sp. z o.o. sp.k.

Proxy-Server für mehrere Webserver

Ich habe mehrere Server, die Webhosting auf den Ports 80 und 443 bereitstellen. Diese Server befinden sich in einem Netzwerk mit einer einzigen öffentlichen IP. Ich muss die Anfragen, die an dieser öffentlichen IP ankommen, an den entsprechenden Server weiterleiten, abhängig von der URL-Zeichenfolge, die im Browser des Clients verwendet wurde. Ich verstehe, dass dies durch die Installation eines Proxy-Servers erfolgt, der diese Aufgabe übernimmt. Die Lösungen, die ich gefunden habe, sind jedoch normalerweise mit mehr Funktionen als Proxyserver integriert. Ich habe bereits meine Webserver, die ordnungsgemäß funktionieren. Ich brauche etwas einfach zu implementierendes und zu wartendes, das ausschließlich diese Funktion erfüllt, damit ich keine Änderungen an den bereits funktionierenden Servern vornehmen muss.
Ich habe mehrere Server, die Webhosting auf den Ports 80 und 443 bereitstellen. Diese Server befinden sich in einem Netzwerk mit einer einzigen öffentlichen IP. Ich muss die Anfragen, die an dieser öffentlichen IP ankommen, an den entsprechenden Server weiterleiten, abhängig von der URL-Zeichenfolge, die im Browser des Clients verwendet wurde. Ich verstehe, dass dies durch die Installation eines Proxy-Servers erfolgt, der diese Aufgabe übernimmt. Die Lösungen, die ich gefunden habe, sind jedoch normalerweise mit mehr Funktionen als Proxyserver integriert. Ich habe bereits meine Webserver, die ordnungsgemäß funktionieren. Ich brauche etwas einfach zu implementierendes und zu wartendes, das ausschließlich diese Funktion erfüllt, damit ich keine Änderungen an den bereits funktionierenden Servern vornehmen muss.
Show original content

3 users upvote it!

4 answers


dbapl
NGINX (http://nginx.org/) works well as an HTTP (S) proxy. It can do 1-to-1 and 1-to-many proxies. The redirection can be set both by the hostname in the query and by the URL. It also does well as an accelerator keeping responses in the cache if needed (eg for static files).
NGINX (http://nginx.org/) works well as an HTTP (S) proxy. It can do 1-to-1 and 1-to-many proxies. The redirection can be set both by the hostname in the query and by the URL. It also does well as an accelerator keeping responses in the cache if needed (eg for static files).

Machine translated

http://nginx.org/...

1 like

wojciech_marcinkiewicz
I would suggest getting interested in the Cloudflare service. You don't have to install anything on your servers. At the same time, you will ensure the Anti-DDoS protection and the security of your servers.
I would suggest getting interested in the Cloudflare service. You don't have to install anything on your servers. At the same time, you will ensure the Anti-DDoS protection and the security of your servers.

Machine translated


1 like

danielemilioalba

I know and use Cloudfare. However, in this case I need to install something on my internal network that is the one that has only a public IP. I'm trying nginx as suggested in another answer. Then I tell my experience.

I know and use Cloudfare. However, in this case I need to install something on my internal network that is the one that has only a public IP. I'm trying nginx as suggested in another answer. Then I tell my experience.

Machine translated


OpenAI BOT

You can achieve this by using a reverse proxy server. This type of server forwards client requests to the appropriate backend server based on the URL path. One simple and popular tool for this purpose is Apache HTTP Server with mod_proxy module enabled. Here is a basic configuration example: html ServerName example.com ProxyPass /server1/ http://server1-ip/ ProxyPassReverse /server1/ http://server1-ip/ ProxyPass /server2/ http://server2-ip/ ProxyPassReverse /server2/ http://server2-ip/ In this configuration, requests to example.com/server1/ will be forwarded to server1 and requests to example.com/server2/ will be forwarded to server2. You can add more ProxyPass directives for additional backend servers as needed. This way, you can keep your existing web servers untouched while achieving the desired forwarding functionality.

You can achieve this by using a reverse proxy server. This type of server forwards client requests to the appropriate backend server based on the URL path. One simple and popular tool for this purpose is Apache HTTP Server with mod_proxy module enabled. Here is a basic configuration example: html ServerName example.com ProxyPass /server1/ http://server1-ip/ ProxyPassReverse /server1/ http://server1-ip/ ProxyPass /server2/ http://server2-ip/ ProxyPassReverse /server2/ http://server2-ip/ In this configuration, requests to example.com/server1/ will be forwarded to server1 and requests to example.com/server2/ will be forwarded to server2. You can add more ProxyPass directives for additional backend servers as needed. This way, you can keep your existing web servers untouched while achieving the desired forwarding functionality.

Machine translated