mirror of
https://github.com/YunoHost-Apps/mediawiki_ynh.git
synced 2024-09-03 19:46:05 +02:00
Update nginx config according to https://www.nginx.com/resources/wiki/start/topics/recipes/mediawiki/
This commit is contained in:
parent
1791a31732
commit
12756f6bef
1 changed files with 11 additions and 3 deletions
|
@ -14,7 +14,8 @@ location __PATH__/ {
|
||||||
|
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
try_files $uri $uri/ index.php;
|
try_files $uri $uri/ @rewrite___NAME__;
|
||||||
|
|
||||||
location ~ [^/]\.php(/|$) {
|
location ~ [^/]\.php(/|$) {
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||||
|
@ -25,8 +26,6 @@ location __PATH__/ {
|
||||||
fastcgi_param REMOTE_USER $remote_user;
|
fastcgi_param REMOTE_USER $remote_user;
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||||
|
|
||||||
try_files $uri @rewrite;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||||||
|
@ -35,6 +34,11 @@ location __PATH__/ {
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location = __PATH__/_.gif {
|
||||||
|
expires max;
|
||||||
|
empty_gif;
|
||||||
|
}
|
||||||
|
|
||||||
location ^~ __PATH__/cache/ {
|
location ^~ __PATH__/cache/ {
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
@ -46,3 +50,7 @@ location __PATH__/ {
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location @rewrite___NAME__ {
|
||||||
|
rewrite ^/__PATH__/(.*)$ /__PATH__/index.php?title=$1&$args;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue