<VirtualHost *:*>
        ServerName gwp.bulme.at
        ServerAdmin rai@bulme.at
        DocumentRoot "/var/www/gwp.bulme.at/htdocs"
        <Directory /var/www/gwp.bulme.at/htdocs>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Require all granted
        </Directory>
        ErrorLog /var/log/apache2/error.gwp.bulme.at.log
        LogLevel warn
        CustomLog /var/log/apache2/access.gwp.bulme.at.log combined
        ServerSignature On
	
	# CertBot
	RewriteEngine on
	RewriteCond %{SERVER_NAME} =gwp.bulme.at
	RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

    # Optional: Umleitung von Port 8080 auf HTTPS
    Redirect 301 / http://gwp.bulme.at:8080/

	#webdav
	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
	    <RequireAny>
	        # Require method GET POST OPTIONS
	        Require valid-user
	    </RequireAny>
	    DirectoryIndex disabled
	</Location>
</VirtualHost>

