How to do it...

Let's begin with the configuration:

  1. Adjust the firewall to allow the traffic just in port 80. To list the available application configurations, we run the following command:
   sudo ufw app list      Available applications:      Nginx Full      Nginx HTTP      Nginx HTTPS      OpenSSH
  1. Nginx Full means that we will allow the traffic from ports 80 (HTTP) and 443 (HTTPS). At this point, we haven't configured any domain with SSL, so we should restrict the traffic to pass just through port 80 (HTTP):
   sudo ufw allow 'Nginx HTTP'
  1. If we try to access our IP, we should see our Nginx working:
  1. If you want to administrate the process of Nginx, you can ...

Get React Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.