<IfModule mod_ssl.c>
<VirtualHost *:443>
#-------------------------------------------------------------------------------
#  svr.hmuna.com (SSL)
#-------------------------------------------------------------------------------
	ServerName svr.hmuna.com
	ServerAdmin server-admin@hmuna.com
	DocumentRoot /mnt/raid_vol/html/growi
	ProxyPass / http://localhost:3000/
	ProxyPassReverse / http://localhost:3000/

	# Enable SSL for this virtual host.
	SSLEngine on

	# $B%/%i%$%"%s%H>ZL@=q(B
	SSLCACertificateFile   /etc/ssl/unofficial_for_CL/private_ca.crt
	SSLVerifyDepth         1

	#<Directory /opt/growi>
	<Directory /mnt/raid_vol/html/growi>
		# $B%m%0%$%sG'>Z!J(Bkgb $B$H9g$o$;$k!K(B
		<RequireAny>
			# $B%m!<%+%k%M%C%H$+$i$O%Q%9%o!<%I$J$7%"%/%;%9$r5v2D(B
			Require ip 172.0.0.1
			Require ip 192.168.1

			# $B%/%i%$%"%s%H>ZL@=q$,3NG'$G$-$?>l9g$K$O%"%/%;%95v2D(B
			Require ssl-verify-client

			# $B$=$l0J30$O(B Google Authentificator $B$rMxMQ(B
			<RequireAll>
				Require not env force_drop
				AuthType Basic
				AuthName "Enter OTP password"
				AuthBasicProvider OTP
				Require valid-user
				OTPAuthUsersFile /mnt/raid_vol/html/otp/users
				OTPAuthMaxLinger 3600
				OTPAuthMaxOTPFailure 200
				OTPAuthLogoutOnIPChange On
				OTPAuthPINAuthProvider file
			</RequireAll>
		</RequireAny>
	</Directory>

	# $B%m%0@_Dj(B
	# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
	LogLevel error
	#LogLevel debug
	#LogLevel alert
	ErrorLog /var/log/apache2/error_svr.log
	SetEnvIf Remote_Addr "192.168.1." no_log
	CustomLog /var/log/apache2/svr.access.log combined env=!no_log

	<Directory /opt/growi>
		Options +FollowSymLinks
		AllowOverride None
	</Directory>

SSLCertificateFile /etc/letsencrypt/live/svr.hmuna.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/svr.hmuna.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
