|?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|

|*if HAS_NGINX_PHP_CONF="yes"|
	include /usr/local/directadmin/data/users/|USER|/nginx_php.conf;
|*endif|

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

	include /etc/nginx/webapps.conf;
}

server {
	listen |IP|:|PORT_443| ssl default_server;
	http2 on;
	server_name _;

	ssl_certificate      |CERT|;
	ssl_certificate_key  |KEY|;

	root "|DOCROOT|";
	index index.html index.htm index.php;
	|NGINX_USERDIR|
|*if HAS_NGINX_PHP_CONF="yes"|
	include /usr/local/directadmin/data/users/|USER|/nginx_php.conf;
|*endif|
	# deny access to apache .htaccess files
	location ~ /\.ht
	{
		deny all;
	}

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