Am 2015-09-25 hielt ich (bongo) einen Vortrag über mein den Weg zu einer Dokumentationslösung, meine Anforderungen, wovon mir abgeraten wurde und woran ich letzendlich hängen blieb.
(Ich gehe davon aus ihr könnt mit git rudimentär umgehen, eine Shell bedienen und Apache konfigurieren)
{{indexmenu>:|js#bj-tango.png navbar id#random skipfile+/(sidebar|hooks)/}}
#!/usr/bin/env bash echo -ne 'Content-type: text/plain\r\n\r\n' # ''Updating'' cd $DOCUMENT_ROOT/data/pages/ git pull 2>&1 # From https://www.dokuwiki.org/caching "All of DokuWiki's cache files can be easily invalidated by “touching” the conf/local.php file" touch $DOCUMENT_ROOT/conf/local.php echo $? echo .
AuthUserFile /var/www/wiki/data/pages/hooks/.htpasswd AuthType Basic AuthName "hooks" # Here is where we allow/deny Order Deny,Allow Satisfy any Deny from all Require valid-user
RewriteEngine On RewriteCond %{THE_REQUEST} !^GET\ /.*?static/(css|js|img) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [L,QSA] # set an environment variable "noauth" SetEnvIf Request_URI ^/web_hook\.cgi noauth=1 AuthUserFile /var/www/wiki/.htpasswd AuthType Basic AuthName "." # Here is where we allow/deny Order Deny,Allow Satisfy any Deny from all Require valid-user Allow from env=noauth
<IfModule mod_ssl.c> <VirtualHost *:443> ServerAdmin webmaster@localhost ServerName wiki.myomain.example DocumentRoot /var/www/wiki <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/wiki> Options -Indexes +FollowSymLinks +MultiViews AllowOverride All Order allow,deny allow from all </Directory> <DirectoryMatch ".*/\.(git|svn|ssh)/.*"> Require all denied </DirectoryMatch> <LocationMatch "/(data|conf|bin|inc)/"> Order allow,deny Deny from all Satisfy All </LocationMatch> ScriptAlias /web_hook.cgi /var/www/wiki/data/pages/hooks/web_hook.cgi ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined # SSL Engine Switch: # Enable/Disable SSL for this virtual host. SSLEngine on SSLCertificateFile /etc/ssl/certs/myhost.crt SSLCertificateKeyFile /etc/ssl/private/myhost.key SSLCertificateChainFile /etc/ssl/certs/wosign_root_bundle.crt # Im Zweifel mal bei https://cipherli.st oder https://bettercrypto.org schauen SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH SSLProtocol All -SSLv2 -SSLv3 SSLHonorCipherOrder On </VirtualHost> </IfModule>
https://webhooks:SUPERSECRET@wiki.mydomain.example/web_hook.cgi
als Webhook in Gitlab (o.ä.) registrieren