Wiki installation
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
To create yet another MediaWiki on an existing server, sharing the same database engine and Apache configuration:
- using a separate
domain
; - using a separate
dbuser
; - using a separate
wikiname
, wheredbname=wikinamewiki
; - using very short URLs.
- Register your domain and have DNS point to your hosting machine.
- Enable Plesk > Domains > domain > Setup > Services > PHP Support.
- Login on the server.
- Create a new database user, database and grant privileges accordingly:
mysql -u root -p
grant select, insert, update, delete, create on wikinamewiki.* to ' dbuser '@'localhost';
- Switch to the new domain:
cd /var/www/vhosts/domain/httpdocs/
.
- Unpack the MediaWiki archive:
tar xvzf /srv/Z/mediawiki-1.6.2.tar.gz
- Temporarily make the
config
directory writable for all:chmod a+rwx config/
- Hop into your browser and visit
http://domain/config/
; this will bring up the Wiki configuration form and createLocalSettings.php
as a result. NOTA BENE Make a note of all names and passwords. - Revoke the
create
grant on the database:mysql -u root -p
revoke create on dbname.* to ' dbuser '@'localhost';
- Move the resulting
LocalSettings.php
to the document root:mv config/LocalSettings.php .
- Edit
LocalSettings.php
to show:$wgScriptPath = "";
$wgArticlePath = "$wgScriptPath/$1";
$wgEnableUploads = true;
# login to edit
$wgGroupPermissions['*']['edit'] = false;
$wgShowIPinHeader = false;
- Disable any subsequent confiration actions by removing write access on the
config/
directory:chmod go=--- config/
- Only allow user
wwwrun
to be able te readLocalSettings.php
—it contains the datbase user name and password:chmod go=--- LocalSettings.php
- Switch to the domain's Apache configuration directory:
cd ../conf/
- Create the
vhosts.conf
file with the following contents:# Help Mediawiki's very short URLs work
<Directory /var/www/vhosts/domain/httpdocs>
Options FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /index.php?title=$1 [L,QSA]
</Directory>
- Include the following line at the end of
/etc/apache2/httpd.include
:Include /var/www/vhosts/manontromp.com/conf/vhost.conf
- Do a syntax check and any repair on your Apache configuration:
/etc/init.d/apache2 configtest
- Restart Apache:
/etc/init.d/apache2 restart
Done. Enjoy your new Wiki.
Short URLs
- Modify .htaccess according to: