Installation Mediawiki: Unterschied zwischen den Versionen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| (6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
Folgende Pakete müssen installiert werden: | Folgende Pakete müssen installiert werden: | ||
< | <syntaxhighlight lang=bash> | ||
aptitude install apache2 php5 mysql-server php5-mysql php5-intl diff | aptitude install apache2 php5 mysql-server php5-mysql php5-intl diff | ||
</ | </syntaxhighlight> | ||
Um Mediawiki zu installieren wird als erstes ein vhost Ordner angelegt und in diesen gewechselt: | Um Mediawiki zu installieren wird als erstes ein vhost Ordner angelegt und in diesen gewechselt: | ||
<pre> | <pre> | ||
| Zeile 32: | Zeile 32: | ||
php_admin_value safe_mode off | php_admin_value safe_mode off | ||
<Location /> | |||
<LimitExcept POST GET> | |||
Deny from All | |||
</LimitExcept> | |||
</Location> | |||
<Directory /srv/httpd/vhosts/wiki2.laub-home.de/htdocs/> | <Directory /srv/httpd/vhosts/wiki2.laub-home.de/htdocs/> | ||
Options -Indexes FollowSymLinks -Includes -MultiViews | Options -Indexes FollowSymLinks -Includes -MultiViews | ||
AllowOverride | AllowOverride All | ||
Order allow,deny | Order allow,deny | ||
allow from all | allow from all | ||
| Zeile 47: | Zeile 52: | ||
# Don't run arbitrary PHP code. | # Don't run arbitrary PHP code. | ||
php_admin_flag engine off | php_admin_flag engine off | ||
RewriteEngine On | |||
RewriteCond %{QUERY_STRING} \.[^\\/:*?\x22<>|%]+(#|\?|$) [nocase] | |||
RewriteRule . - [forbidden] | |||
# If you've other scripting languages, disable them too. | # If you've other scripting languages, disable them too. | ||
</Directory> | </Directory> | ||
<FilesMatch "(README|COPYING|CREDITS|FAQ|HISTORY|INSTALL|RELEASE-NOTES|UPGRADE|COPYING|OBSOLETE|TODO)"> | |||
order allow,deny | |||
deny from all | |||
</FilesMatch> | |||
ErrorLog /var/log/apache2/wiki2.laub-home.de-error.log | ErrorLog /var/log/apache2/wiki2.laub-home.de-error.log | ||
CustomLog /var/log/apache2/wiki2.laub-home.de-access.log combined | CustomLog /var/log/apache2/wiki2.laub-home.de-access.log combined | ||
| Zeile 58: | Zeile 70: | ||
LogLevel warn | LogLevel warn | ||
RewriteEngine on | |||
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/index.php [L] | |||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f | |||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d | |||
RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B] | |||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f | |||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d | |||
RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B] | |||
</VirtualHost> | </VirtualHost> | ||
</pre> | </pre> | ||
| Zeile 81: | Zeile 100: | ||
</pre> | </pre> | ||
=== Meine LocalSettings.php Änderungen === | === Meine LocalSettings.php Änderungen === | ||
< | <syntaxhighlight lang=php> | ||
# Short URLs | |||
$wgScriptPath = ""; | |||
$wgScriptExtension = ".php"; | |||
$wgArticlePath = "/wiki/$1"; | |||
#$wgGenerateThumbnailOnParse = false; | |||
# End of automatically generated settings. | # End of automatically generated settings. | ||
# Add more configuration options below. | # Add more configuration options below. | ||
| Zeile 150: | Zeile 176: | ||
# Enable Vector Extension | # Enable Vector Extension | ||
require_once( "$IP/extensions/Vector/Vector.php" ); | require_once( "$IP/extensions/Vector/Vector.php" ); | ||
$wgVectorUseSimpleSearch = true; | $wgVectorUseSimpleSearch = true;</syntaxhighlight> | ||
</ | |||
==Quellen== | ==Quellen== | ||
* http://www.mediawiki.org/wiki/Installation | * http://www.mediawiki.org/wiki/Installation | ||
[[Kategorie:Apache]] | |||
[[Kategorie:Linux]] | |||
[[Kategorie:Debian]] | |||
[[Kategorie:Ubuntu]] | |||
[[Kategorie:MediaWiki]] | |||