Update: Added details on setting the default page that shows. Just to remove directory listings
Recently at work we were trying to get MediaWiki installed in a WAMP scenario (Windows, Apache, MySql and PHP). I’m starting this series of posts on the process as there are a few odd little problems that I’ve come across and I wanted to record them along with the whole process for future reference.
Each part of this series installs a required component so generally speaking they should be suitable as individual installation quides and for installation for tools other than MediaWiki
Please don’t have a go at me for installing this stuff on Windows instead of Linux!
Please not that I might come back and put some more details into the instructions and some relevant pictures at a later date. At the current point I don’t have the time, and I hope this is adequate.
Articles in the Series
- Part 1 – Installing Apache
- Part 2 – Installing MySql
- Part 3 – Installing and Configuring PHP
- Part 4 – Installing MediaWiki
The component versions I’m using for the WAMP configuration are:
- Windows Server 2003 R2
- Apache 2.2.11 – Using the windows installer
- MySql 5.1.35 – Using the windows installer… Yes I know I’m insane 😉
- PHP 5.2.9 – Using the zip package
This post will be on the installation of Apache on the Windows 2003 Server, and assumes that Windows has been setup already.
I installed Apache on a system that has IIS installed on it already due to the server being used as a test bed for ASP.NET 2.0 applications so I’m going to install apache and change the port it listens on to 8080. I thought i would show the process of how to do this as 1. It’s not hard and 2. It might come in useful to someone who comes across the same issue.
Installation went something like this:
- Download the latest version of the Apache from here
- Run the Executable (Current version i used for this post was ”apache_2.2.11-win32-x86-openssl.0.9.8i.msi”)
- Click “Run” when security warning dialog comes up
- When installer wizard is ready click “Next >”
- Select the “I accept the terms in the license agreement” radio button and click “Next >”
- Click “Next >”
- The details are not important in a demonstration site. Please fill the details in if hosting in an important place. Ensure that the “for All Users, on Port 80, as a service – Recommended.” Is the section radio button and click “Next >”
- Ensure “Typical” is selected and click “Next >”
- Click “Next >” to accept the installation directory… Please make a note of it especially if you change it. This post and future ones in the series assume that you have not changed the installation path.
- Click “Install”. You may get an error about using the same port as another server if you have installed it on a server that has IIS installed. We will fix this soon!
- Once the installation has finished click “Finish”
- Open the “httpd.conf” file (this is the configuration file for apache2! It is in the “C:\Program Files\Apache Software Foundation\Apache2.2\conf” folder if you have kept the default installation path!)
- Find the line that starts with “Listen” and change the 80 to 8080. This changes the port that Apache listens on from port 80 to port 8080 obviously.
- If you are installing PHP later and MediaWiki, then find the line that starts with “DirectoryIndex” and set the line to “DirectoryIndex index.php index.html”. This will cause Apache to look for the given two files before showing a directory listing… which I happen to not want to have happen.
- Save the file
- In the start menu find the apache folder and click the “Monitor Apache Servers” You will probably get an error stating that it has already been started. Go to the notification area at the bottom right of the screen on the toolbar and click the apache monitor icon (nearly the same icon as the start menu)
- Start/Restart apache!
- To test open a browser and type in Http://localhost:8080 and you should have a page come up saying “It works!”
Next we will install MySql…