mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-01-27 00:33:34 +00:00
34 lines
1.5 KiB
Plaintext
34 lines
1.5 KiB
Plaintext
Listen 127.0.1.1:80
|
|
<VirtualHost 127.0.1.1:80>
|
|
ServerName regression
|
|
ServerAlias myempty mycaldav
|
|
DocumentRoot /path/to/davical/htdocs
|
|
CustomLog ${APACHE_LOG_DIR}/regression-access.log combined
|
|
ErrorLog ${APACHE_LOG_DIR}/regression-error.log
|
|
|
|
Alias /davical /path/to/davical/htdocs
|
|
<Directory /path/to/davical/htdocs>
|
|
Require all granted
|
|
DirectoryIndex index.php index.html
|
|
php_value include_path /path/to/awl/inc:/path/to/davical/testing
|
|
</Directory>
|
|
|
|
RewriteEngine On
|
|
# Redirect /.well-known URLs
|
|
RewriteRule ^/\.well-known/(.*)$ /caldav.php/.well-known/$1 [NC,L]
|
|
# and other special URLs
|
|
RewriteRule ^/principals/users/(.*)$ /caldav.php/$1 [NC,L]
|
|
RewriteRule ^/principals/resources/(.*)$ /caldav.php/$1 [NC,L]
|
|
RewriteRule ^/calendars/__uids__/(.*)$ /caldav.php/$1 [NC,L]
|
|
RewriteRule ^/addressbooks/__uids__/(.*)$ /caldav.php/$1 [NC,L]
|
|
# let caldav.php handle "anything else"
|
|
RewriteCond %{REQUEST_URI} !^/$
|
|
RewriteCond %{REQUEST_URI} !\.(php|css|png|gif|js|jpg|ico)
|
|
RewriteRule ^(.*)$ /caldav.php$1 [NC,L]
|
|
|
|
# All content for our UI should be served locally.
|
|
<FilesMatch "(admin|help|iSchedule|index|metrics|public|setup|tools|upgrade).php">
|
|
Header set Content-Security-Policy "default-src 'none'; img-src 'self' data:; media-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline' data:; font-src 'self' data:; object-src 'self'; base-uri 'self'; connect-src 'self'; form-action 'self'; frame-ancestors 'self'"
|
|
</FilesMatch>
|
|
</VirtualHost>
|