|CUSTOM1|
|?DOCROOT=`HOME`/domains/`DOMAIN`/private_html|
|?REALDOCROOT=`HOME`/domains/`DOMAIN`/private_html|
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/usr/local/lib/php/|
server
{
|CUSTOM|

	listen |IP|:|PORT_443| ssl|SPACE_HTTP2|;
	|MULTI_IP|

	server_name |DOMAIN| www.|DOMAIN| |SERVER_ALIASES|;

	access_log /var/log/nginx/domains/|DOMAIN|.log;
	access_log /var/log/nginx/domains/|DOMAIN|.bytes bytes;
	error_log /var/log/nginx/domains/|DOMAIN|.error.log;

	root |DOCROOT|;

	index index.php index.html index.htm;

	ssl on;
	ssl_certificate |CERT|;
	ssl_certificate_key |KEY|;

	|NGINX_PHP_CONF|
	
|*if HAVE_NGINX_PROXY="1"|
	location /
	{
|CUSTOM2|
|LOCATION_INSERT|
		# access_log off;
		proxy_buffering |PROXY_BUFFERING|;
		proxy_pass https://|IP|:|PORT_8081|;
		proxy_set_header X-Client-IP      $remote_addr;
		proxy_set_header X-Accel-Internal /nginx_static_files;
		proxy_set_header Host             $host;
		proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
		proxy_hide_header Upgrade;
	}
	location /nginx_static_files/
	{
		# access_log  /var/log/nginx/access_log_proxy;
		alias       |DOCROOT|/;
		internal;
	}
|*else|
|NGINX_REDIRECTS|
|PROTECTED_DIRECTORIES|
|EXTRA_LOCATIONS|
|*endif|

|CUSTOM3|

	include /etc/nginx/webapps.ssl.conf;
	
|CUSTOM4|
}
