Changes

Jump to: navigation, search

Installing Mediawiki 1.31.3 on OpenBSD 6.5

1,067 bytes added, 13:29, 2 October 2019
Configure web server for MediaWiki installation
rcctl start httpd
== Configure web server for MediaWiki installation ==
Add aram to the www group:
The wiki should now work with traditional (long) URLs.
 
=== Enable short URLs ===
 
Use this httpd.conf to enable short URLs and disable access to the installer.
 
server "w2.mgk.ro" {
listen on * port 80
root "/htdocs/w2.mgk.ro"
directory no index
location "/w/*.php" {
fastcgi socket "/run/php-fpm.sock"
}
'''location "/wiki/*" {'''
'''fastcgi param SCRIPT_FILENAME "/htdocs/w2.mgk.ro/w/index.php"'''
'''fastcgi socket "/run/php-fpm.sock"'''
'''}'''
location "/w/" { directory index index.php }
location "/w/resources/assets/*" { pass }
location "/w/resources/lib/*" { pass }
location "/w/resources/src/*" { pass }
location "/w/skins/*" { pass }
location "/w/extensions/*" { pass }
location "/images/deleted/*" { block }
location "/images/*" { pass }
location "/" {
'''block return 301 "http://$SERVER_NAME/wiki/Main_Page"'''
}
location "/*" { block }
}
 
 
Then edit <code>LocalSettings.php</code> to enable short URLs:
 
$wgScriptPath = "/w";
$wgScriptExtension = ".php";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;
 
Restart httpd:
 
doas rcctl restart httpd
 
You are now done.

Navigation menu