# Virtual Host configuration by gitea-page, dont change
#
server {
	listen 80;
	listen [::]:80;

	server_name {{ .Domain }};

	root {{ .Path }};
	index index.html;

	location / {
		try_files $uri $uri/ =404;
	}
}

{{if .SSL.Active }}
server {
	listen 443 ssl;
	listen [::]:443 ssl;

	server_name {{ .Domain }};

	ssl_certificate {{ .SSL.Cert }};
	ssl_certificate_key {{ .SSL.Key }};

	ssl_protocols     TLSv1.2 TLSv1.3;
    ssl_ciphers       ECDH+AESGCM+AES256:ECDH+CHACHA20; # TLSv1.2
    #ssl_conf_command  Ciphersuites TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256; # TLSv1.3
    ssl_ecdh_curve    secp384r1;

	root {{ .Path }};
	index index.html;

	location / {
		try_files $uri $uri/ =404;
	}
}

{{end}}
