Would you like to learn how to configure the Nginx server as a proxy on a computer running Ubuntu Linux? In this tutorial, we are going to configure the Nginx server as a proxy to an Apache server.
• Ubuntu 18
• Ubuntu 19
• Ubuntu 20
• Nginx 1.18.0
In our example, the IP address of the Nginx server is 192.168.100.10.
In our example, the IP address of the Apache server is 192.168.100.9.
Equipment list
The following section presents the list of equipment used to create this tutorial.
As an Amazon Associate, I earn from qualifying purchases.
Nginx – Related Tutorial:
On this page, we offer quick access to a list of tutorials related to Nginx.
Tutorial – Nginx as a proxy
Install the Nginx server.
Edit the Nginx configuration file for the default website.
Here is the file, before our configuration.
Here is the file, after our configuration.
In our example, the Nginx server will work as a proxy and send all requests to the remote server.
Restart the Nginx service.
Open your browser and enter the IP address of your web server.
In our example, the following URL was entered in the Browser:
• http://192.168.100.10
The Nginx server will work as a proxy and display the website of the Apache server.
Congratulations! You have finished the configuration of the Nginx server as a proxy.