Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
infrastructure
Commits
d75f534d
Commit
d75f534d
authored
Mar 31, 2021
by
Kristian Klausen
🎉
Committed by
Jelle van der Waa
May 01, 2021
Browse files
archwiki: Simplify php blocks
parent
a796434f
Changes
2
Hide whitespace changes
Inline
Side-by-side
roles/archwiki/templates/LocalSettings.php.j2
View file @
d75f534d
...
...
@@ -69,4 +69,5 @@ $wgEditPageFrameOptions = "DENY";
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath
=
""
;
$wgArticlePath
=
"/title/$1"
;
$wgUsePathInfo
=
true
;
# $wgUsePathInfo is not necessary: https://github.com/wikimedia/mediawiki/blob/bb92c4d1acc029eed0f6848360dff5b2436695fc/includes/WebRequest.php#L151-L153
#$wgUsePathInfo = true;
roles/archwiki/templates/nginx.d.conf.j2
View file @
d75f534d
...
...
@@ -57,33 +57,13 @@ server {
return 307 /title/$1;
}
# special case due to our '/index.php/Main_Page' type URLs
location ~ ^/(?:index|redirect)\.php(?:/.*)$ {
access_log /var/log/nginx/{{ archwiki_domain }}/access.log main;
access_log /var/log/nginx/{{ archwiki_domain }}/access.log.json json_main;
fastcgi_pass archwiki;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
include fastcgi_params;
}
# special case for '/load.php' type URLs to cache css/js in nginx to relieve php-fpm
location = /load.php {
access_log /var/log/nginx/{{ archwiki_domain }}/access.log main;
access_log /var/log/nginx/{{ archwiki_domain }}/access.log.json json_main;
fastcgi_pass archwiki;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
include fastcgi_params;
include fastcgi.conf;
fastcgi_cache wiki;
fastcgi_cache_valid 200 10m;
...
...
@@ -98,16 +78,12 @@ server {
# normal PHP FastCGI handler
location ~ ^/[^/]+\.php$ {
try_files $uri =404;
access_log /var/log/nginx/{{ archwiki_domain }}/access.log main;
access_log /var/log/nginx/{{ archwiki_domain }}/access.log.json json_main;
fastcgi_pass archwiki;
fastcgi_index index.php;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
include fastcgi_params;
include fastcgi.conf;
}
# whitelist known OK directories
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment