##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Copyright 2020 Logic and Optimization Group, Universitat de Lleida. All Rights Reserved.

# the upstream component nginx needs to connect to
upstream WSconnexion {
	server unix:/sentinelApp/wsDownloader/site.sock; # for a file socket
	# server 127.0.0.1:5001; # for a web port socket (we'll use this first)
}

# Default server configuration
#
server {
	listen 80 default_server;
	listen [::]:80 default_server;

	root /var/www/html;
	index index.html index.htm index.nginx-debian.html;

	server_name _;

	location /get_file/ { alias VAR_DIR_VAR; }
	location / { try_files $uri @wsSentinel; }
	location @wsSentinel {
			uwsgi_pass  WSconnexion;
			include     uwsgi_params;
	}
}

