|?CACERT_LINE=|
|*if CACERT!=""|
|?CACERT_LINE=ssl_client_certificate `CACERT`;|
|*endif|
|?NGINX_USERDIR=include /etc/nginx/nginx-userdir.conf;|
|*if HAVE_USERDIR_ACCESS="0"|
|?NGINX_USERDIR=|
|*endif|
server {
	listen |IP|:|PORT_80| default_server;
	server_name _;
	root |DOCROOT|;
	index index.html index.htm index.php;
	|NGINX_USERDIR|
	include /usr/local/directadmin/data/users/|USER|/nginx_php.conf;

	# deny access to apache .htaccess files
	location ~ /\.ht
	{
		deny all;
	}

	include /etc/nginx/webapps.conf;
}

server {
	listen |IP|:|PORT_443||SPACE_HTTP2| default_server;
	server_name _;

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

	root |DOCROOT|;
	index index.html index.htm index.php;
	|NGINX_USERDIR|
	include /usr/local/directadmin/data/users/|USER|/nginx_php.conf;

	# deny access to apache .htaccess files
	location ~ /\.ht
	{
		deny all;
	}

	include /etc/nginx/webapps.conf;
}
