From ab20cc695d939948bdd5a2a900c61b4f5f77224b Mon Sep 17 00:00:00 2001 From: opi Date: Thu, 30 Oct 2014 00:28:29 +0100 Subject: [PATCH] [enh] Move config file into appropriate folder. Declare default ACL. --- conf/acl.auth.php | 21 ++++++ conf/dokuwiki.php | 188 ++++++++++++++++++++++++++++++++++++++++++++++ scripts/install | 4 +- scripts/upgrade | 4 +- 4 files changed, 215 insertions(+), 2 deletions(-) create mode 100644 conf/acl.auth.php create mode 100644 conf/dokuwiki.php diff --git a/conf/acl.auth.php b/conf/acl.auth.php new file mode 100644 index 0000000..45a6bb2 --- /dev/null +++ b/conf/acl.auth.php @@ -0,0 +1,21 @@ +# acl.auth.php +# +# Don't modify the lines above +# +# Access Control Lists +# +# Editing this file by hand shouldn't be necessary. Use the ACL +# Manager interface instead. +# +# If your auth backend allows special char like spaces in groups +# or user names you need to urlencode them (only chars <128, leave +# UTF-8 multibyte chars as is) +# +# none 0 +# read 1 +# edit 2 +# create 4 +# upload 8 +# delete 16 + +* @ALL 1 diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php new file mode 100644 index 0000000..c4053ce --- /dev/null +++ b/conf/dokuwiki.php @@ -0,0 +1,188 @@ + tags + // 'htmldiff' - diff as HTML table + // 'html' - the full page rendered in XHTML +$conf['rss_media'] = 'both'; //what should be listed? + // 'both' - page and media changes + // 'pages' - page changes only + // 'media' - media changes only +$conf['rss_update'] = 5*60; //Update the RSS feed every n seconds (defaults to 5 minutes) +$conf['rss_show_summary'] = 1; //Add revision summary to title? 0|1 + +/* Advanced Settings */ +$conf['updatecheck'] = 0; //automatically check for new releases? +$conf['userewrite'] = 0; //this makes nice URLs: 0: off 1: .htaccess 2: internal +$conf['useslash'] = 0; //use slash instead of colon? only when rewrite is on +$conf['sepchar'] = '_'; //word separator character in page names; may be a + // letter, a digit, '_', '-', or '.'. +$conf['canonical'] = 0; //Should all URLs use full canonical http://... style? +$conf['fnencode'] = 'url'; //encode filenames (url|safe|utf-8) +$conf['autoplural'] = 0; //try (non)plural form of nonexisting files? +$conf['compression'] = 'gz'; //compress old revisions: (0: off) ('gz': gnuzip) ('bz2': bzip) + // bz2 generates smaller files, but needs more cpu-power +$conf['gzip_output'] = 0; //use gzip content encodeing for the output xhtml (if allowed by browser) +$conf['compress'] = 1; //Strip whitespaces and comments from Styles and JavaScript? 1|0 +$conf['cssdatauri'] = 0; //Maximum byte size of small images to embed into CSS, won't work on IE<8 +$conf['send404'] = 0; //Send a HTTP 404 status for non existing pages? +$conf['broken_iua'] = 0; //Platform with broken ignore_user_abort (IIS+CGI) 0|1 +$conf['xsendfile'] = 0; //Use X-Sendfile (1 = lighttpd, 2 = standard) +$conf['renderer_xhtml'] = 'xhtml'; //renderer to use for main page generation +$conf['readdircache'] = 0; //time cache in second for the readdir operation, 0 to deactivate. + +/* Network Settings */ +$conf['dnslookups'] = 1; //disable to disallow IP to hostname lookups +// Proxy setup - if your Server needs a proxy to access the web set these +$conf['proxy']['host'] = ''; +$conf['proxy']['port'] = ''; +$conf['proxy']['user'] = ''; +$conf['proxy']['pass'] = ''; +$conf['proxy']['ssl'] = 0; +$conf['proxy']['except'] = ''; +// Safemode Hack - read http://www.dokuwiki.org/config:safemodehack ! +$conf['safemodehack'] = 0; +$conf['ftp']['host'] = 'localhost'; +$conf['ftp']['port'] = '21'; +$conf['ftp']['user'] = 'user'; +$conf['ftp']['pass'] = 'password'; +$conf['ftp']['root'] = '/home/user/htdocs'; + + diff --git a/scripts/install b/scripts/install index 9af6d7c..b973ea2 100755 --- a/scripts/install +++ b/scripts/install @@ -17,12 +17,14 @@ if [[ ! $? -eq 0 ]]; then fi # Modify dokuwiki conf -sed -i "s@YNH_ADMIN_USER@$admin@g" ../sources/conf/dokuwiki.php +sed -i "s@YNH_ADMIN_USER@$admin@g" ../conf/dokuwiki.php # Copy files to the right place final_path=/var/www/dokuwiki sudo mkdir -p $final_path sudo cp -a ../sources/* $final_path +sudo cp ../conf/dokuwiki.php $final_path/conf +sudo cp ../conf/acl.auth.php $final_path/conf # Files owned by root, www-data can just read sudo find $final_path -type f | xargs sudo chmod 0644 diff --git a/scripts/upgrade b/scripts/upgrade index ed5b9f4..da5d150 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,12 +16,14 @@ fi path=${path%/} # Modify dokuwiki conf -sed -i "s@YNH_ADMIN_USER@$admin@g" ../sources/conf/dokuwiki.php +sed -i "s@YNH_ADMIN_USER@$admin@g" ../conf/dokuwiki.php # Copy files to the right place final_path=/var/www/dokuwiki sudo mkdir -p $final_path sudo cp -a ../sources/* $final_path +sudo cp ../conf/dokuwiki.php $final_path/conf +sudo cp ../conf/acl.auth.php $final_path/conf # Files owned by root, www-data can just read sudo find $final_path -type f | xargs sudo chmod 0644