Reverse proxy and rewrite URL in NGINX
February 04, 2023 08:27AM
I want to redirect requests to our internal repository servers without edit repository addresses in package manager's configuration. Here is the scenario:

Add internal IP (NGINX Server) address to hosts file as "ubuntu.com" or any other domain in each server.
Reverse proxy http or https requests which wants reach "ubuntu.com" or other domains to repository server address with different port as http request.
Would you please comment some samples for this scenario?

I can do reverse proxy, but I need some samples to rewrite URL if needed and replace domain with repository server address.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 120
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready