<VirtualHost *:441>
	ServerName plan.ucm.dev
	ServerAlias plan
	DocumentRoot "/home/sam/plan.dev/ui/static"
	ServerAdmin sam@ucm.dev
	ErrorLog logs/plan-dev-error_log
	CustomLog logs/plan-dev-access_log combined

	ProxyRequests Off
	ProxyPreserveHost On
	ProxyVia Full
	<Proxy *>
		Require all granted
	</Proxy>
	<Location />
		ProxyPass http://127.0.0.1:3000/
		ProxyPassReverse http://127.0.0.1:3000/
	</Location>
	<Location /static/>
		ProxyPass !
	</Location>

	<Directory "/home/sam/plan.dev/ui/static">
		AllowOverride None
		Require all granted
	</Directory>
	Alias /static/ /home/sam/plan.dev/ui/static/

	SSLCertificateFile /etc/letsencrypt/live/ucm.dev/fullchain.pem
	SSLCertificateKeyFile /etc/letsencrypt/live/ucm.dev/privkey.pem
	Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
<VirtualHost *:80>
	ServerName plan.ucm.dev
	ServerAlias plan
	DocumentRoot "/home/sam/plan.dev/ui/static"
	ServerAdmin sam@ucm.dev
	ErrorLog logs/plan-dev-error_log
	CustomLog logs/plan-dev-access_log combined
	RewriteEngine on
	RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
</VirtualHost>
<VirtualHost *:441>
	ServerName plan-api.ucm.dev
	ServerAlias plan-api
	DocumentRoot "/home/sam/plan.dev/ui/static"
	ServerAdmin sam@ucm.dev
	ErrorLog logs/plan-dev-error_log
	CustomLog logs/plan-dev-access_log combined

	<Directory "/home/sam/plan.dev/api/static">
		AllowOverride None
		Require all granted
	</Directory>
	Alias /static/ /home/sam/plan.dev/api/static/

	WSGIDaemonProcess plan.ucm.dev user=www-data group=www-data processes=2 home=/home/sam/plan.dev python-path=/home/sam/plan.dev python-home=/home/sam/plan.dev/py-env
	WSGIProcessGroup plan.ucm.dev
	WSGIScriptAlias / /home/sam/plan.dev/api/wsgi.py
	WSGIPassAuthorization On

	<Directory /home/sam/plan.dev/api>
		<Files wsgi.py>
			Require all granted
		</Files>
	</Directory>

#	ProxyRequests Off
#	ProxyPreserveHost On
#	ProxyVia Full
#	<Proxy *>
#		Require all granted
#	</Proxy>
#	<Location />
#		ProxyPass http://127.0.0.1:8000/
#		ProxyPassReverse http://127.0.0.1:8000/
#	</Location>
#	<Location /static/>
#		ProxyPass !
#	</Location>

	SSLCertificateFile /etc/letsencrypt/live/ucm.dev/fullchain.pem
	SSLCertificateKeyFile /etc/letsencrypt/live/ucm.dev/privkey.pem
	Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
<VirtualHost *:80>
	ServerName plan-api.ucm.dev
	ServerAlias plan-api
	DocumentRoot "/home/sam/plan.dev/ui/static"
	ServerAdmin sam@ucm.dev
	ErrorLog logs/plan-dev-error_log
	CustomLog logs/plan-dev-access_log combined
	RewriteEngine on
	RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
</VirtualHost>
