InfCloud (Linux): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(7 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 11: | Zeile 11: | ||
=== Apache === | === Apache === | ||
<pre> | |||
sudo a2enmod mime && sudo a2enmod headers | |||
</pre> | |||
==== Intranet ==== | ==== Intranet ==== | ||
Zeile 87: | Zeile 91: | ||
=== Links === | === Links === | ||
[https://www.inf-it.com/ | <pre> | ||
sudo vi auth/config.inc | |||
</pre> | |||
<pre> | |||
'href'=>(empty($_SERVER['HTTPS']) ? 'http' : 'https').'://infcloud.kirner.or.at:443/caldav.php/'.$_SERVER['PHP_AUTH_USER'].'/', | |||
</pre> | |||
<pre> | |||
sudo vi auth/plugins/generic_conf.inc | |||
</pre> | |||
<pre> | |||
$pluginconfig['base_url']=(empty($_SERVER['HTTPS']) ? 'http' : 'https').'://infcloud.kirner.or.at:443'; | |||
</pre> | |||
[https://www.inf-it.com/infcloud/readme.txt https://www.inf-it.com/infcloud/readme.txt] | |||
== Probleme == | |||
=== Quellübergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf ... === | |||
<pre> | |||
sudo vi /etc/apache2/sites-available/baikal-ssl.conf | |||
</pre> | |||
<pre> | |||
<VirtualHost *:443> | |||
... | |||
RewriteEngine On | |||
<IfModule mod_headers.c> | |||
Header unset Access-Control-Allow-Origin | |||
Header unset Access-Control-Allow-Methods | |||
Header unset Access-Control-Allow-Headers | |||
Header unset Access-Control-Allow-Credentials | |||
Header unset Access-Control-Expose-Headers | |||
# If your setup is working and complete you can replace the "*" with CardDavMATE instalation | |||
# origin (protocol/host/port) - see the examples below (for multiple origins use multiple headers) | |||
#Header always set Access-Control-Allow-Origin "http://www.server.com" | |||
#Header always set Access-Control-Allow-Origin "https://www.server.com" | |||
#Header always set Access-Control-Allow-Origin "https://www.server.com:8080" | |||
Header always set Access-Control-Allow-Origin "*" | |||
Header always set Access-Control-Allow-Methods "GET,POST,OPTIONS,PROPFIND,PROPPATCH,REPORT,PUT,MOVE,DELETE,LOCK,UNLOCK" | |||
Header always set Access-Control-Allow-Headers "User-Agent,Authorization,Content-type,Depth,If-match,If-None-Match,Lock-Token,Timeout,Destination,Overwrite,Prefer,X-client,X-Requested-With" | |||
Header always set Access-Control-Allow-Credentials false | |||
Header always set Access-Control-Expose-Headers "Etag,Preference-Applied" | |||
RewriteCond %{HTTP:Access-Control-Request-Method} !^$ | |||
RewriteCond %{REQUEST_METHOD} OPTIONS | |||
RewriteRule ^(.*)$ $1 [R=200,L] | |||
</IfModule> | |||
... | |||
</VirtualHost> | |||
</pre> | |||
== Links == | == Links == |
Aktuelle Version vom 3. Januar 2020, 18:42 Uhr
Installation
wget https://www.inf-it.com/InfCloud_0.13.1.zip unzip InfCloud_0.13.1.zip sudo mv infcloud/ /var/www/infcloud_0_13_1 sudo chown -R www-data.www-data /var/www/infcloud_0_13_1/
Konfiguration
Apache
sudo a2enmod mime && sudo a2enmod headers
Intranet
cd /etc/apache2/conf-available/ sudo vi infcloud.conf
Alias /infcloud "/var/www/infcloud_0_13_1/" <Directory "/var/www/infcloud_0_13_1"> Options +FollowSymLinks AllowOverride All <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/infcloud_0_13_1 SetEnv HTTP_HOME /var/www/infcloud_0_13_1 </Directory>
sudo a2enconf infcloud sudo service apache2 reload
HTTPs
sudo vi /etc/apache2/sites-available/infcloud.conf
<VirtualHost *:80> ServerName infcloud.kirner.or.at ServerAlias infcloud.kirner.or.at Redirect / https://infcloud.kirner.or.at </VirtualHost>
sudo vi /etc/apache2/sites-available/infcloud-ssl.conf
<VirtualHost *:443> ServerName infcloud.kirner.or.at SSLEngine on SSLCertificateFile /etc/ssl/certs/infcloud.crt SSLCertificateKeyFile /etc/ssl/private/apache.key # Pfad zu den Webinhalten DocumentRoot /var/www/infcloud_0_13_1 ErrorLog ${APACHE_LOG_DIR}/infcloud.kirner.or.at-error.log CustomLog ${APACHE_LOG_DIR}/infcloud.kirner.or.at-access.log combined </VirtualHost>
cd /etc/apache2/sites-available/ sudo openssl req -new -x509 -key /etc/ssl/private/apache.key -days <days> -sha256 -out /etc/ssl/certs/infcloud.crt sudo a2ensite infcloud.conf sudo a2ensite infcloud-ssl.conf sudo service apache2 reload
copy the source code into your web server directory (if you use Apache it is strongly recommended to enable the following modules: mod_expires, mod_mime and mod_deflate ... see .htaccess for more details)
Links
sudo vi auth/config.inc
'href'=>(empty($_SERVER['HTTPS']) ? 'http' : 'https').'://infcloud.kirner.or.at:443/caldav.php/'.$_SERVER['PHP_AUTH_USER'].'/',
sudo vi auth/plugins/generic_conf.inc
$pluginconfig['base_url']=(empty($_SERVER['HTTPS']) ? 'http' : 'https').'://infcloud.kirner.or.at:443';
https://www.inf-it.com/infcloud/readme.txt
Probleme
Quellübergreifende (Cross-Origin) Anfrage blockiert: Die Gleiche-Quelle-Regel verbietet das Lesen der externen Ressource auf ...
sudo vi /etc/apache2/sites-available/baikal-ssl.conf
<VirtualHost *:443> ... RewriteEngine On <IfModule mod_headers.c> Header unset Access-Control-Allow-Origin Header unset Access-Control-Allow-Methods Header unset Access-Control-Allow-Headers Header unset Access-Control-Allow-Credentials Header unset Access-Control-Expose-Headers # If your setup is working and complete you can replace the "*" with CardDavMATE instalation # origin (protocol/host/port) - see the examples below (for multiple origins use multiple headers) #Header always set Access-Control-Allow-Origin "http://www.server.com" #Header always set Access-Control-Allow-Origin "https://www.server.com" #Header always set Access-Control-Allow-Origin "https://www.server.com:8080" Header always set Access-Control-Allow-Origin "*" Header always set Access-Control-Allow-Methods "GET,POST,OPTIONS,PROPFIND,PROPPATCH,REPORT,PUT,MOVE,DELETE,LOCK,UNLOCK" Header always set Access-Control-Allow-Headers "User-Agent,Authorization,Content-type,Depth,If-match,If-None-Match,Lock-Token,Timeout,Destination,Overwrite,Prefer,X-client,X-Requested-With" Header always set Access-Control-Allow-Credentials false Header always set Access-Control-Expose-Headers "Etag,Preference-Applied" RewriteCond %{HTTP:Access-Control-Request-Method} !^$ RewriteCond %{REQUEST_METHOD} OPTIONS RewriteRule ^(.*)$ $1 [R=200,L] </IfModule> ... </VirtualHost>
Links
https://www.inf-it.com/open-source/clients/infcloud/
Zurück zu CalDav/CardDav Webclients