Setting up Nginx as reverse proxy

To use Nginx as our reverse proxy solution, we first need to get it installed on our system. For Fedora-based distributions, this can be easily installed by using the dnf or yum based package manager by running the following command:

$ sudo dnf install nginx

For other distributions, their package managers can be used to install the Nginx package.

Once the Nginx package is installed, we now need to do its configuration to allow it to communicate with our application server.

To configure Nginx to proxy the communication to our application server, create a file named bugzot.conf under the /etc/nginx/conf.d directory, with the following contents:

server {
listen 80;
server_name <your_domain> www.<your_domain>;

location / {
include proxy_params;
proxy_pass http://unix:<path_to_project_folder>/bugzot.sock;
}
}

Now with the Nginx configured, we need to establish a relationship between our Gunicorn application server and Ngnix. So, let's do it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.190.156.93