<IfModule mod_ssl.c>
<VirtualHost *:443>
	LogLevel debug
	ServerName gwp.bulme.at
	ServerAdmin rai@bulme.at
	
	DocumentRoot "/var/www/gwp.bulme.at/htdocs/PRD"
	
	<Directory /var/www/gwp.bulme.at/htdocs/PRD>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Require all granted
                <FilesMatch ".+\.ph(ar|p|tml)$">
                        SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost/"
                </FilesMatch>
	</Directory>
	
	ErrorLog /var/log/apache2/error.gwp.bulme.at.log
	LogLevel warn
	CustomLog /var/log/apache2/access.gwp.bulme.at.log combined
	ServerSignature On
	
	Alias /PRD /var/www/gwp.bulme.at/htdocs/PRD
	Alias /v002 /var/www/gwp.bulme.at/htdocs/v002
	<Directory /var/www/gwp.bulme.at/htdocs/v002/>
		Options FollowSymLinks
		AllowOverride All
		Require all granted
	</Directory>
	Alias /DEV23-RAI /var/www/gwp.bulme.at/htdocs/DEV23-RAI
	

	<LocationMatch "^/DEV23-RAI/.*\.ph(ar|p|tml)$">
		SetHandler "proxy:unix:/run/php/php8.3-fpm.sock|fcgi://localhost/"
	</LocationMatch>

	<Directory /var/www/gwp.bulme.at/htdocs/DEV23-RAI>
		Options FollowSymLinks
		AllowOverride All
		Require all granted
		<FilesMatch ".+\.ph(ar|p|tml)$">
			SetHandler "proxy:unix:/run/php/php8.3-fpm.sock|fcgi://localhost/"
		</FilesMatch>
	</Directory>

	SSLCertificateFile /etc/letsencrypt/live/gwp.bulme.at/fullchain.pem
	SSLCertificateKeyFile /etc/letsencrypt/live/gwp.bulme.at/privkey.pem
	Include /etc/letsencrypt/options-ssl-apache.conf
	
	Alias /webdav /var/www/gwp.bulme.at/htdocs
	<Location /webdav>
		DAV On
		SSLRequireSSL
		Options Indexes
		AuthType Basic
		AuthName WebDAV
		AuthUserFile /var/www/gwp.bulme.at/htdocs/.htpasswd-webdav
		Require valid-user
		# # php_flag engine off (disabled for FPM)
		DirectoryIndex disabled
		ForceType text/plain
	</Location>
	
	Alias /webdav-backups /home/wolfgang/backups
	<Location /webdav-backups>
		DAV On
		SSLRequireSSL
		Options Indexes
		AuthType Basic
		AuthName WebDAV
		AuthUserFile /var/www/gwp.bulme.at/htdocs/.htpasswd-webdav
		Require valid-user
		# # php_flag engine off (disabled for FPM)
		DirectoryIndex disabled
		ForceType text/plain
	</Location>

	Alias /webdav-juc /var/www/gwp.bulme.at/htdocs/juc
	<Location /webdav-juc>
		DAV On
		SSLRequireSSL
		Options Indexes
		AuthName WebDAV
		Authtype Basic
		AuthUserFile /var/www/gwp.bulme.at/.htpasswd-juc
		Require valid-user
		# # php_flag engine off (disabled for FPM)
		DirectoryIndex disabled
		ForceType text/plain
	</Location>

</VirtualHost>
</IfModule>
