server {
	listen 80;
	listen [::]:80;

	charset UTF-8;

	server_name ____________________;

	index index.html index.htm;

	client_max_body_size 0;

	access_log /var/log/nginx/____________________/access.log compression;
	error_log /var/log/nginx/____________________/error.log warn;

	try_files $uri $uri/ =404;

	location / {

		if ($request_method = 'OPTIONS') {
			add_header 'Access-Control-Allow-Origin' '*';
			#
			# Om nom nom cookies
			#
			add_header 'Access-Control-Allow-Credentials' 'true';
			add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, OPTIONS';
			#
			# Custom headers and headers various browsers *should* be OK with but aren't
			#
			add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
			#
			# Tell client that this pre-flight info is valid for 20 days
			#
			add_header 'Access-Control-Max-Age' 1728000;
			add_header 'Content-Type' 'text/plain charset=UTF-8';
			add_header 'Content-Length' 0;

			return 204;
		}

		auth_basic "Hoshinova Page";
		auth_basic_user_file /var/www/.htpasswd;


		proxy_pass			http://localhost:1104;
		proxy_http_version		1.1;
		proxy_set_header		Upgrade				$http_upgrade;
		proxy_set_header		Connection			'upgrade';
		proxy_set_header		Host				$host;
		proxy_cache_bypass		$http_upgrade;
		proxy_set_header		X-Forwarded-Proto		$scheme;
		proxy_set_header		X-Forwarded-For			$proxy_add_x_forwarded_for;
		proxy_set_header		X-Real-IP			$remote_addr;
		proxy_set_header		X-Proxy-From			____________________;
		proxy_set_header		X-NginX-Proxy			true;
		proxy_set_header		SSL_PROTOCOL			$ssl_protocol;
		proxy_set_header		HTTP_COUNTRY-Code		$geoip_country_code;
		proxy_redirect			off;

		proxy_pass_request_headers	on;
	}
}
