What is it?
Web Server Software, which handles proxying, load balancing and caching.
Just some master, slave architecture, handling different processes and their communication with the outside world/web
Example
You need to add your new website configuration to sites-enabled:
/etc/ngingx/sites-enabled/<ngingxfilename(ending doesn't matter, consider .conf)>
This is a configuration example for django. Its missing static files conf for readability. refer to this tutorial If you want a simple html web server.
server {
listen 80;
server_name 172.16.42.234;
charset utf-8;
client_max_body_size 10m;
client_body_buffer_size 128k;
location / {
include proxy_params;
proxy_pass http://unix:/home/philippweinmann/github/bb_django_api/document_classification/django.sock;
}
}
and link it with sites-available
ln -s /usr/local/etc/nginx/sites-available/<ngingxfilename> /usr/local/etc/nginx/sites-enabled
the simply restart nginx:
sudo systemctl restart nginx.service
Debugging
{bash} sudo nano error.log NginX logs
I'm sure there much more that can be done for debugging