Installing and setting up Apache Webserver with PHP – Setting up Private WoW Server

Update: Please check the updated post on Installing Apache, PHP, MySQL on Windows XP (for XP users) or Installing Apache, PHP, MySQL on Windows Vista (for Vista and 7 users) instead.

And if you’re looking for an updated wow private server guide, please check the new version on how to create wow private server for better version. Besides the new guide list everything in a single page for easier reading

This is the fourth part of the Creating your own World of Warcraft Server using Mangos

  1. The First part is all about Installing and Configuring MySQL on your Windows Machine
  2. The Second part is about Configuring the WoW Mangos itself
  3. The Third part is all about Setting up Private WOW Server for Lan Party
  4. The Fourth part is all about Installing and Setting up Apache Webserver with PHP

Okay this is the last part of my guide about creating and setting up private wow server. And as the title said, this part is all about setting up webserver using apache on your pc that can be used to put the registration page for your private wow server

Previously i’ve said that i want to tell you on how to create the registration page for your wow server. Unfortunately, it seems impossible (if you know a good registration page that can be used for WoW Classic Server and TBC Server … please let me know) because different mangos version use different structure like column number differences between the wow classic server with the wow tbc server inside the realmd.account table. So in this guide im going to tell you to use the simple registration page created by Mangos-files.de that can be used for the registration page of your WoW Classic Server

But i think you don’t have to worry about that, because if you understand the steps required to set up webserver on your pc, basically you’ve done the important part with the exception you might need to edit / create the registration page by yourself

As a side note, you can also use your webserver for many other things like hosting your own webpages from your own computer :)

That’s all for the intro … now we’re going to start the guide

Requirements :

  • Apache HTTPD (Free / Open Source) – In this example i use Apache 1.3.3.7 (Apache 1 Series)
  • PHP Win32 Zip Version (Free / Open Source) – In this example i use PHP 4.4.3 (PHP4 Series)
  • Know how to setup port forwarding
  • A simple registration page for mangos

Optional : Some people might prefer the easiest way of doing it … and if you like it that way then i’d suggest you to use XAMPP instead. But if you decided to use XAMPP and you already followed my previous mysql installation guide, you don’t need to enable the MySQL Service from XAMPP Control Panel

Note : i never tried using XAMPP but from the screenshot at XAMPP Website i think the XAMPP provides you a control panel / menu to enable or disable individual service from it

Important Note : Please take caution if you want to make your webserver accessible to everyone, because this guide only tell you the basic way of setting up webserver from your own computer

Installing Apache Webserver :

Since Apache installation for Windows is straightforward, you can just simply follow the setup process until this part, and then continue with the installation process until finished :

Apache Host Configuration

and don’t forget to remember the path where you’re going to install it

Apache path

Installing PHP :

First of all you need to extract php into somewhere on your harddrive, and in this example the php location is at C:\PHP. And after you’ve finished extracting it, go to C:\PHP\Sapi from Windows Explorer and copy the php4apache.dll into the root of the php directory. If you choose to use Apache 2, then you need to copy the php4apache2.dll instead

Here’s what it should look like :

Copy PHP dll into PHP root directory

Installing PHP as module in Apache HTTPD :

Now after finished with the previous steps, you need to configure apache to load the php4 as a module. And here’s how to do it

1. Open httpd.conf in your Apache conf directory (in this example, the httpd.conf can be found at C:\Program Files\Apache Group\Apache\conf\httpd.conf)

2. Uncomment the :

LoadModule rewrite_module modules/mod_rewrite.so

and add this line after all the loadmodule :

LoadModule php4_module “C:/php/php4apache.dll”

Example image below :

Apache load php module

3. At the addmodule section uncomment the :

AddModule mod_rewrite.c

and then at this line :

AddModule mod_php4.c

example image below :

Apache add module

4. At the addtype section add this line :

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Apache addtype

5. Now at the DirectoryIndex section add / replace the previous line with this one :

DirectoryIndex index.html index.php

Apache directory index

From the above example, the index.html always get first priority over index.php file but you can change it as you like

Testing your Apache Installation :

As for the last, now you need to open the command prompt window (Start Menu -> Run -> type CMD) or Start Menu -> Accessories -> Command Prompt

and type :

  1. Net stop apache
  2. Net start apache

This is done to make apache reload the configuration files that have been changed

Apache test page

Now you’ve finished with all the process, but of course you need to make sure your webserver is working properly so now you need to test it by typing http://localhost via your browser and if you see something like above image, that means your webserver is working

You’ve finished setting up apache webserver, mysql and php on your computer .. Now what you should do next ? well … because this is part of the mangos series guide, of course now you need to put the registration page you’ve downloaded previously into your www document root directory

If you followed this guide, the document root can be found at C:\Program Files\Apache Group\Apache\htdocs … but since the webserver is located on the same location as where you are, you don’t need FTP Program to do it, you just need to copy / extract the simple registration page into that directory … simple isn’t it ?

Comment?

Note: Comment may not appear right away.

134 comments on “Installing and setting up Apache Webserver with PHP – Setting up Private WoW Server

  1. Hello Joel,

    Sure i can do that (to be honest, actually i ran my own server on linux, CentOS) :) .. just wait im going to prepare for it

    anyway if you’re looking for the download address for HTTPD 1.3 under linux, you can get it from :

    http://httpd.apache.org/download.cgi

    as a side note, actually Apache 1.3 is not mean to be used on Win32 especially for production server, because (quoted from Apache Documentation) :

    the older 1.3 series was never designed to run on Windows, but that support was ‘hacked in’, introducing a large number of potential thread saftey issues and other confirmed problems.

    and as i said before, im going to prepare the new guide now ;)

  2. PROBLEM: Your guide is based upon the very old Apache 1.3. It is useless against the new Apache 2.2. There have been so many major changes. In fact, I am trying to find Apache 1.3 to download and it is not to be found.

    Is there a guide update looming on the horizon? I really hate to come this far only to have a none accessible WoW server.

  3. Reaper-X,

    It’s me again. If you want to write this out for Linux users, I am more than happy to help. You have my email address from this, right? I can send you another address.

    Linux would seriously improve the WoW server. Perhaps allow 2x or more players concurrently. Probably less lag. Meanwhile using a less powerful computer. ;-)

    Peace!

  4. Reaper-X,
    So far this is the best guide I have seen. Apparently it is important to smoke crack before making a WoW Private Server guide. There is even one idiot who wrote the how-to guide but admitted he never actually DID IT. Sounds like a man for sure….”I never did it myself but let me tell you how”.

    Could you produce the same guide except based upon the far superior Linux? :-D Its a shame to through away all that high performance and security on windows.

  5. hey man i think ur guide is great!!!!!! how do i become a gm and make a few other of my friends gm’s befor we advertise? (sorry i cant spell anything right lol)
    thank you-
    garris

    1. Thanks Garris,

      as for your question :

      here’s the tip from ChrisB (his method is easier compared to mine) lol

      “create charname password” to make a new logon then “setgm charname 3″ use 3-6 for diff gm levels

  6. actually, i edited it in regedit… and i still dont work… now it says “Error 123:The Filename, Directory Name, or label syntax is incorrect

  7. yea, installed using XAMPP and set up everything as best i could following your guide… but one problem came.. the service path for apache2 is different from what it should be when i check the properties in the services pane it says it needs

    “C:\Program Files\Apache Software Foundation\Apache2.2\bin\httpd.exe” -k runservice

    but my apache isnt set up in that directory.. and the thing wont let me change the path from the services pane

    i need to change it so it works with XAMPP, i think it should be “C:\xampp\apache\bin\httpd.exe” -k runservice

    any help with this is appreciated

    1. Unfortunately since i never use an all in one pack like XAMPP or similar program, i cant say much about it :(

  8. I cant understand the apache download thingy, when I try to download 1.3.37 I come to some sort of directory with loads of stuff.. can someone pls provide me with the direct link? Thanks

    1. sure just click here (MSI Installer)

      as a side note, apache website detect the closest download mirror to your location, and that link is the closest mirror to me :)

    2. Hmm, in the httpd.conf I cant find any ‘addmodule’ sections or any addmodule commands at all, any help? Thanks

    3. ah im sure you’re missing that line because that line is always there except for additional module like php in this example

      so try searching for addmodule using your fav text editor search function, and when you located the addmodule section, add the php module just like in this example (after all the builtin addmodule)

    4. Heh didnt see you posted… Actually I did search for them, even searched for ‘add’ only too but nothing but words in comments and such

  9. Having a problem when my friends try to log on. They can log into the server, but cannot get past the realm selection screen. I’m not sure if it’s a problem with my mangos or with some security setting or what. I can log on fine, but they can’t. Anyone’s help would be greatly appreciated. Thanks.

    1. Yeah I had that problem when I just dove into the thing. I fixed the problem by following the guide, setting up the mysql right, making sure the realmd and mangos connected right (in the conf files) and ya. Just double check everything, you may need to open some ports (mighta forgot) and if you still have the problem, uninstall, reinstall, follow guide down to every last detail. :D

  10. oh crap I ran into another problem =/

    I actually don’t know fully how to explain it but here I go…

    So I did everything right? have everything set up, server’s been running for a couple days, friends have been loving it, but now I wanna make the registration page right? So as you can tell I figured out how to make it public and stuff… but now (after config-ing it) I tried creating an account through it and it didn’t work… it just gives me this blank page after clicking “submit” =/

    suggestions? ideas?

  11. nevermind, after working on it for a couple minutes I figured it out. Great guide btw, shame a couple links are dead and things are out of date. I used this guide with a different version of MaNGOS but it still helped a lot… I was surprised :D

    Nothing like a little ingenuity.

    1. you need to setup port forwarding first and make it so port 80 can be accessed from outside (if you’re behind router) and you’re not using DMZ

    2. actually because I was using a router and my router used 80 (wtf?) so I couldn’t use 80… so I used 8080 and it still didn’t work, but I realized “hey I have a firewall” so I opened that bitch up and tahdah! it worked. lol thanks :D

  12. which apache version you’ve installed ? if you’re running apache 2, use :

    net start apache2
    net stop apache2

    instead :)

    or you can also start / stop it manually from the Windows Services

    to get into the Windows XP Services area you can do these steps :

    # First Method

    – Open Control Panel
    – Choose Administrative Tools
    – Choose Services

    # Second Method (my prefered method)

    – Open the Run command (Windows Key + R)
    – type services.msc
    – press enter and that’s it

    1. I just want to ask you, when I ran Navicat and did the folder Mangos, it had errors, so I did continue with errors and it said successful, how bad was that? Also,what version is this for? (im not finished installing the patches). Thanks, this is a great guide, I started with emuchat.com’s guide, but this is way better. : )

  13. When I type:

    1. Net stop apache
    2. Net start apache

    at the command prompt I get an error that says:

    The service name is invalid.

    or:

    The specified service does not exist as an installed service.

    I have reinstalled both Apache and PHP serveral times and I get the same error. I know they are installed because they appear in the programs list.

    Please help.

  14. You said you wanted a link to a good login website for classic/TBC. Well good news, I found one! (It’s not mine)

    http://majestic202.phpnet.us/create.php

    It’s super fast. The part under the registration is a list of the players currently signed in. Consider this a token of my immense gratitude for all the help your guide has been! THANK YOU!

  15. Is there any way for auto created accounts?
    i mean to type in login their desire ID: & Pass:
    and log with that.
    is there a way? i need to know thank you.

    1. dude this is a great guide, your an idiot if you dont understand it, it isnt just a simple installer.exe people like you fustrate me!

  16. dude i cant do it… :( I dint understand it.. I need help!!! I want to badly to set a register accounts into my server… plz help

  17. Well, I decided to do something different. I found a program called WAMPS, its MySQL/Apache/PHP in one. Real helpful. Seems to work great too. Little to no user setup, that I really needed to do.

  18. # Porisius

    Im really sorry for late reply, i’ve been sick for the past few days (i caught bad flu and still hasnt fully recovered yet)

    about your question, if you’re using PHP5 then you need to adjust the loadmodule to use LoadModule php5_module

    as for the AddModule, you need to add that line manually :)

    # Kazilah

    Thank you very much for your kind words. As for change your wow player status into GM, you can change it manually using 3rd mysql client

    (if you follow this guide, that means you’ve put php and apache in your machine, and now you can use phpmyadmin to make editing your mysql easier) :)

  19. Hey, you are the man! I got this whole thing working first try. I am skipping this last quide though as I will only have a couple of friends playing, and I will just manually create their accounts. The last thing I was wondering was if you know how to set up accounts to make them with GM rights. I would like to set up my guy at lvl 70, with all epics :D

    Thanks again for the guide!

    A++++

  20. I am using Apache 2.0.59 for Windows and PHP 5.2.3. I can not get the LoadModule php4_module “d:/php/php5apache2.dll” to work. The file is where it is suppose to be, but Apache fails to start up if this line isn’t commented. Also, there isn’t an AddModule area in my httpd.conf. I find everything else, but this.