Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
7d3bfea2ca
|
@@ -57,13 +57,21 @@
|
|||||||
|
|
||||||
- name: Install MediaWiki
|
- name: Install MediaWiki
|
||||||
command: |
|
command: |
|
||||||
php maintenance/install.php --dbname="{{ mw_db_name }}" \
|
php maintenance/install.php --server="http://{{ mw_domain }}/" \
|
||||||
--dbuser="{{ mw_db_user }}" --dbpass="{{ mw_db_pass }}" \
|
--dbname="{{ mw_db_name }}" --dbuser="{{ mw_db_user }}" \
|
||||||
--pass="{{ mw_admin_pass }}" "{{ mw_namespace }}" admin
|
--dbpass="{{ mw_db_pass }}" --pass="{{ mw_admin_pass }}" \
|
||||||
|
--scriptpath="/w" "{{ mw_namespace }}" "{{ mw_admin }}"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ mw_dir }}/public_html/w"
|
chdir: "{{ mw_dir }}/public_html/w"
|
||||||
creates: "{{ mw_dir }}/public_html/w/LocalSettings.php"
|
creates: "{{ mw_dir }}/public_html/w/LocalSettings.php"
|
||||||
|
|
||||||
|
- name: Set MediaWiki Article Path
|
||||||
|
lineinfile:
|
||||||
|
path: "{{ mw_dir }}/public_html/w/LocalSettings.php"
|
||||||
|
regexp: '^\$wgArticlePath'
|
||||||
|
insertafter: '^\$wgScriptPath'
|
||||||
|
line: '$wgArticlePath = "/wiki/$1";'
|
||||||
|
|
||||||
- name: "Enable Apache Module: rewrite"
|
- name: "Enable Apache Module: rewrite"
|
||||||
apache2_module:
|
apache2_module:
|
||||||
name: rewrite
|
name: rewrite
|
||||||
|
@@ -1,186 +0,0 @@
|
|||||||
<?php
|
|
||||||
# This file was automatically generated by the MediaWiki 1.33.0
|
|
||||||
# installer. If you make manual changes, please keep track in case you
|
|
||||||
# need to recreate them later.
|
|
||||||
#
|
|
||||||
# See includes/DefaultSettings.php for all configurable settings
|
|
||||||
# and their default values, but don't forget to make changes in _this_
|
|
||||||
# file, not there.
|
|
||||||
#
|
|
||||||
# Further documentation for configuration settings may be found at:
|
|
||||||
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
|
|
||||||
|
|
||||||
# Protect against web entry
|
|
||||||
if ( !defined( 'MEDIAWIKI' ) ) {
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
## Uncomment this to disable output compression
|
|
||||||
# $wgDisableOutputCompression = true;
|
|
||||||
|
|
||||||
$wgSitename = "{{ mw_sitename }}";
|
|
||||||
$wgMetaNamespace = "{{ mw_namespace }}";
|
|
||||||
|
|
||||||
## The URL base path to the directory containing the wiki;
|
|
||||||
## defaults for all runtime URL paths are based off of this.
|
|
||||||
## For more information on customizing the URLs
|
|
||||||
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
|
|
||||||
## https://www.mediawiki.org/wiki/Manual:Short_URL
|
|
||||||
|
|
||||||
$wgScriptPath = "/w";
|
|
||||||
$wgScriptExtension = ".php";
|
|
||||||
$wgArticlePath = "/wiki/$1";
|
|
||||||
|
|
||||||
## The protocol and server name to use in fully-qualified URLs
|
|
||||||
$wgServer = "http://{{ mw_domain }}";
|
|
||||||
|
|
||||||
## The URL path to static resources (images, scripts, etc.)
|
|
||||||
$wgResourceBasePath = $wgScriptPath;
|
|
||||||
|
|
||||||
## The URL path to the logo. Make sure you change this from the default,
|
|
||||||
## or else you'll overwrite your logo when you upgrade!
|
|
||||||
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
|
|
||||||
#$wgLogo = "/logo.png";
|
|
||||||
|
|
||||||
## UPO means: this is also a user preference option
|
|
||||||
|
|
||||||
$wgEnableEmail = false;
|
|
||||||
$wgEnableUserEmail = true; # UPO
|
|
||||||
|
|
||||||
$wgEmergencyContact = "apache@{{ mw_domain }}";
|
|
||||||
$wgPasswordSender = "apache@{{ mw_domain }}";
|
|
||||||
|
|
||||||
$wgEnotifUserTalk = false; # UPO
|
|
||||||
$wgEnotifWatchlist = false; # UPO
|
|
||||||
$wgEmailAuthentication = true;
|
|
||||||
|
|
||||||
## Database settings
|
|
||||||
$wgDBtype = "mysql";
|
|
||||||
$wgDBserver = "{{ mw_db_host }}";
|
|
||||||
$wgDBname = "{{ mw_db_name }}";
|
|
||||||
$wgDBuser = "{{ mw_db_user }}";
|
|
||||||
$wgDBpassword = "{{ mw_db_pass }}";
|
|
||||||
|
|
||||||
# MySQL specific settings
|
|
||||||
$wgDBprefix = "";
|
|
||||||
|
|
||||||
# MySQL table options to use during installation or update
|
|
||||||
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
|
|
||||||
|
|
||||||
## Shared memory settings
|
|
||||||
$wgMainCacheType = CACHE_ACCEL;
|
|
||||||
$wgMemCachedServers = [];
|
|
||||||
|
|
||||||
## To enable image uploads, make sure the 'images' directory
|
|
||||||
## is writable, then set this to true:
|
|
||||||
$wgEnableUploads = true;
|
|
||||||
$wgGenerateThumbnailOnParse = false;
|
|
||||||
$wgUseImageMagick = true;
|
|
||||||
$wgImageMagickConvertCommand = "/usr/bin/convert";
|
|
||||||
|
|
||||||
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
|
|
||||||
$wgUseInstantCommons = true;
|
|
||||||
|
|
||||||
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
|
|
||||||
# about this MediaWiki instance. The Wikimedia Foundation shares this data
|
|
||||||
# with MediaWiki developers to help guide future development efforts.
|
|
||||||
$wgPingback = true;
|
|
||||||
|
|
||||||
## If you use ImageMagick (or any other shell command) on a
|
|
||||||
## Linux server, this will need to be set to the name of an
|
|
||||||
## available UTF-8 locale
|
|
||||||
$wgShellLocale = "C.UTF-8";
|
|
||||||
|
|
||||||
## Set $wgCacheDirectory to a writable directory on the web server
|
|
||||||
## to make your wiki go slightly faster. The directory should not
|
|
||||||
## be publicly accessible from the web.
|
|
||||||
#$wgCacheDirectory = "$IP/cache";
|
|
||||||
|
|
||||||
# Site language code, should be one of the list in ./languages/data/Names.php
|
|
||||||
$wgLanguageCode = "en";
|
|
||||||
|
|
||||||
$wgSecretKey = "{{ lookup('password', '/dev/null length=64 chars=hexdigits') }}";
|
|
||||||
|
|
||||||
# Changing this will log out all existing sessions.
|
|
||||||
$wgAuthenticationTokenVersion = "{{ lookup('password', '/dev/null length=64 chars=hexdigits') }}";
|
|
||||||
|
|
||||||
# Site upgrade key. Must be set to a string (default provided) to turn on the
|
|
||||||
# web installer while LocalSettings.php is in place
|
|
||||||
$wgUpgradeKey = "{{ lookup('password', '/dev/null length=16 chars=hexdigits') }}";
|
|
||||||
|
|
||||||
## For attaching licensing metadata to pages, and displaying an
|
|
||||||
## appropriate copyright notice / icon. GNU Free Documentation
|
|
||||||
## License and Creative Commons licenses are supported so far.
|
|
||||||
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
|
|
||||||
$wgRightsUrl = "https://creativecommons.org/licenses/by-sa/4.0/";
|
|
||||||
$wgRightsText = "Creative Commons Attribution-ShareAlike";
|
|
||||||
$wgRightsIcon = "$wgResourceBasePath/resources/assets/licenses/cc-by-sa.png";
|
|
||||||
|
|
||||||
# Path to the GNU diff3 utility. Used for conflict resolution.
|
|
||||||
$wgDiff3 = "/usr/bin/diff3";
|
|
||||||
|
|
||||||
## Default skin: you can change the default skin. Use the internal symbolic
|
|
||||||
## names, ie 'vector', 'monobook':
|
|
||||||
$wgDefaultSkin = "vector";
|
|
||||||
|
|
||||||
# Enabled skins.
|
|
||||||
# The following skins were automatically enabled:
|
|
||||||
wfLoadSkin( 'MonoBook' );
|
|
||||||
wfLoadSkin( 'Timeless' );
|
|
||||||
wfLoadSkin( 'Vector' );
|
|
||||||
|
|
||||||
|
|
||||||
# Enabled extensions. Most of the extensions are enabled by adding
|
|
||||||
# wfLoadExtensions('ExtensionName');
|
|
||||||
# to LocalSettings.php. Check specific extension documentation for more details.
|
|
||||||
# The following extensions were automatically enabled:
|
|
||||||
wfLoadExtension( 'CodeEditor' );
|
|
||||||
wfLoadExtension( 'ConfirmEdit' );
|
|
||||||
wfLoadExtension( 'MultimediaViewer' );
|
|
||||||
wfLoadExtension( 'PdfHandler' );
|
|
||||||
wfLoadExtension( 'SpamBlacklist' );
|
|
||||||
wfLoadExtension( 'TitleBlacklist' );
|
|
||||||
wfLoadExtension( 'WikiEditor' );
|
|
||||||
|
|
||||||
|
|
||||||
# End of automatically generated settings.
|
|
||||||
# Add more configuration options below.
|
|
||||||
|
|
||||||
|
|
||||||
# IP restictions
|
|
||||||
if ($_SERVER['REMOTE_ADDR'] != '{{ mw_iplock }}') {
|
|
||||||
$wgGroupPermissions['*']['createaccount'] = false;
|
|
||||||
$wgGroupPermissions['*']['edit'] = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# MobileFrontend
|
|
||||||
#wfLoadExtension( 'MobileFrontend' );
|
|
||||||
#wfLoadSkin( 'Vector' );
|
|
||||||
#$wgMFDefaultSkinClass = 'SkinVector';
|
|
||||||
|
|
||||||
# VisualEditor
|
|
||||||
#wfLoadExtension( 'VisualEditor' );
|
|
||||||
|
|
||||||
# Syntax highlighting
|
|
||||||
#wfLoadExtension( 'SyntaxHighlight_GeSHi' );
|
|
||||||
|
|
||||||
// Enable by default for everybody
|
|
||||||
$wgDefaultUserOptions['visualeditor-enable'] = 1;
|
|
||||||
|
|
||||||
// Optional: Set VisualEditor as the default for anonymous users
|
|
||||||
// otherwise they will have to switch to VE
|
|
||||||
// $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
|
|
||||||
|
|
||||||
// Don't allow users to disable it
|
|
||||||
$wgHiddenPrefs[] = 'visualeditor-enable';
|
|
||||||
|
|
||||||
// OPTIONAL: Enable VisualEditor's experimental code features
|
|
||||||
// #$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
|
|
||||||
|
|
||||||
$wgVirtualRestConfig['modules']['parsoid'] = [
|
|
||||||
'url' => 'http://localhost:8142',
|
|
||||||
];
|
|
||||||
|
|
||||||
$wgShowExceptionDetails = true;
|
|
@@ -8,14 +8,6 @@
|
|||||||
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
|
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
|
||||||
RewriteRule ^/?$ %{DOCUMENT_ROOT}/w/index.php [L]
|
RewriteRule ^/?$ %{DOCUMENT_ROOT}/w/index.php [L]
|
||||||
|
|
||||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
|
|
||||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
|
|
||||||
RewriteRule ^/?w/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/w/thumb.php?f=$1&width=$2 [L,QSA,B]
|
|
||||||
|
|
||||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
|
|
||||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
|
|
||||||
RewriteRule ^/?w/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/w/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
|
|
||||||
|
|
||||||
ErrorLog {{ mw_dir }}/logs/error.log
|
ErrorLog {{ mw_dir }}/logs/error.log
|
||||||
CustomLog {{ mw_dir }}/logs/access.log combined
|
CustomLog {{ mw_dir }}/logs/access.log combined
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
Reference in New Issue
Block a user