Apache configuration

Apache is the recommended webserver for use with MediaWiki. Other servers such as IIS may work.

PHP as Apache Module
MediaWiki is written to use PHP as an Apache module. Your PHP is probably configured as a module if you start with URLs like this: example.com/wiki/index.php/Main_Page You can check which configuration and version of PHP you have by viewing your wiki's Special:Version page, or with phpinfo.

RedHat/Fedora-based Linux
Install PHP: Reload httpd:
 * 1) yum install php php-xml
 * 1) service httpd reload

Debian-based Linux
Install apache2 php5 module: Enable apache2 php5 module:
 * 1) apt-get install apache2 libapache2-mod-php5
 * 1) a2enmod php5

(Debian also has a mediawiki package.)

PHP as CGI
If PHP is running as a CGI, you will have "ugly" URLs by default, but you can still implement short URLs.

mod_alias and mod_rewrite
The recommended method of beautifying URLs involves mod_alias. Other methods use mod_rewrite instead.

mod_security
ModSecurity has been known to cause problems with MediaWiki. If you get errors seemingly at random, check your error log to see whether it is causing problems.

Spiders and bots
You can use a robots.txt file to tell well-behaved spiders not to download dynamically generated pages (edit pages, for instance). This can reduce the load on your webserver, preserve your bandwidth, and prevent duplicate content issues with search engines. However, malicious bots could tie up your webserver and waste your bandwidth by downloading a large volume of pages extremely quickly. Request throttling can help protect against this.