1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dokuwiki_ynh.git synced 2024-09-03 18:26:20 +02:00
* Remove unused code

* Add rewrite URL functionnality

* Fix subpath handling

* Fix nginx error

nginx: [emerg] named location "@dokuwiki" can be on the server level only in /etc/nginx/conf.d/sub.example.org.d/dokuwiki.conf:20

* [enh] Enforce URL rewrite

* Increment package version

Co-authored-by: Gofannon <17145502+Gofannon@users.noreply.github.com>
This commit is contained in:
JimboJoe 2020-03-14 09:08:38 +01:00 committed by GitHub
parent 31b50434a4
commit 7a70f8af76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 5 deletions

View file

@ -23,11 +23,12 @@ $conf['plugin']['authldap']['port'] = 389;
$conf['plugin']['authldap']['version'] = 3; $conf['plugin']['authldap']['version'] = 3;
$conf['plugin']['authldap']['usertree'] = 'ou=users,dc=yunohost,dc=org'; $conf['plugin']['authldap']['usertree'] = 'ou=users,dc=yunohost,dc=org';
$conf['plugin']['authldap']['userfilter'] = '(&(uid=%{user})(objectClass=posixAccount))'; $conf['plugin']['authldap']['userfilter'] = '(&(uid=%{user})(objectClass=posixAccount))';
# no groups
#$conf['plugin']['authldap']['grouptree'] = 'ou=Group, dc=server, dc=tld';
#$conf['plugin']['authldap']['groupfilter'] = '(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))';
/* Advanced Settings */ /* Advanced Settings */
$conf['updatecheck'] = 0; //automatically check for new releases? $conf['updatecheck'] = 0; //automatically check for new releases?
// Taken from previous package. Don't know what it does. Maybe Yunohost corner logo ? // Taken from previous package. Don't know what it does. Maybe Yunohost corner logo ?
$conf['cssdatauri'] = 512; //Maximum byte size of small images to embed into CSS, won't work on IE<8 $conf['cssdatauri'] = 512; //Maximum byte size of small images to embed into CSS, won't work on IE<8
// URL Rewriting is handled by the webserver
$conf['userewrite'] = 1; // See https://www.dokuwiki.org/config:userewrite

View file

@ -1,3 +1,8 @@
# config built from these sources:
# https://www.dokuwiki.org/install:nginx
# https://www.nginx.com/resources/wiki/start/topics/recipes/dokuwiki/
# https://forum.dokuwiki.org/thread/17126
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ { location __PATH__/ {
@ -14,7 +19,8 @@ location __PATH__/ {
# Common parameter to increase upload size limit in conjuction with dedicated php-fpm file # Common parameter to increase upload size limit in conjuction with dedicated php-fpm file
client_max_body_size 25M; client_max_body_size 25M;
try_files $uri $uri/ index.php; try_files $uri $uri/ @dokuwiki;
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
@ -45,3 +51,13 @@ location __PATH__/ {
# Include SSOWAT user panel. # Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;
} }
# rewrites "doku.php/" out of the URLs if you set the userwrite setting to .htaccess in dokuwiki confi$
location @dokuwiki {
rewrite ^__PATH__/_media/(.*) __PATH__/lib/exe/fetch.php?media=$1 last;
rewrite ^__PATH__/_detail/(.*) __PATH__/lib/exe/detail.php?media=$1 last;
rewrite ^__PATH__/_export/([^/]+)/(.*) __PATH__/doku.php?do=export_$1&id=$2 last;
# Specifig to "tag plugin". Added here to allow plugin to work if installed
rewrite ^__PATH__/tag/(.*) __PATH__/doku.php?id=tag:$1&do=showtag&tag=tag:$1 last;
rewrite ^__PATH__/(.*) __PATH__/doku.php?id=$1&$args last;
}

View file

@ -9,7 +9,7 @@
"es": "DokuWiki es un sistema de Wiki de uso sencillicimo y compatible con los estándares.", "es": "DokuWiki es un sistema de Wiki de uso sencillicimo y compatible con los estándares.",
"it": "DokuWiki è un Wiki aderente agli standard, semplice da usare, finalizzato principalmente alla creazione di documentazione di qualsiasi tipo." "it": "DokuWiki è un Wiki aderente agli standard, semplice da usare, finalizzato principalmente alla creazione di documentazione di qualsiasi tipo."
}, },
"version": "2018-04-22a~ynh2", "version": "2018-04-22a~ynh3",
"url": "https://www.dokuwiki.org", "url": "https://www.dokuwiki.org",
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",
"maintainer": { "maintainer": {