Skip to content

Reverse Proxy

Changing Defaults

This configuration will proxy all HTTP requests for localhost port 80 to Endrpi.


Nginx can be used as a reverse proxy for Endrpi which provides the following functionality:

  • Proxy requests to Endrpi from port 80.
  • Serve static content, such as websites, from a directory.
  • Route API requests from clients to the Endrpi server.


  1. Installing Nginx


sudo unlink /etc/nginx/sites-enabled/default
2. Copy the default configuration#
sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/endrpi
3. Open the Endrpi configuration for editing#
sudo nano /etc/nginx/sites-available/endrpi
4. Change the root location to be used as a proxy pass-through#
location / {
   proxy_pass http://localhost:5000;
5. Save changes#


6. Restart Nginx#
sudo systemctl restart nginx

Requests will now be passed through the proxy: http://localhost/docs .


  1. Setting up an NGINX web server on a Raspberry Pi® [Last accessed 03/20/2021]