Welcome! Log In Create A New Profile

Advanced

Reverse proxy and rewrite URL in NGINX

Posted by BlueTigeeeeer 
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: 301
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready