Follow us on Twitter!
You cannot teach a man anything; you can only help him find it within himself. - Galileo
Saturday, April 19, 2014
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Members Online
Total Online: 30
Guests Online: 27
Members Online: 3

Registered Members: 82839
Newest Member: fezphantom
Latest Articles

Setting up Apache on XP

Arrow Image A guide on howto set up Apache

=[ Setting up a server on a windows box with Apache ]---

To understand what we are doing you should have some basic knowledge of networks,
computers and internet. I will try to explain everything on my best, if I miss something
please correct me.

--- What we need is ---
-> Windows XP/NT with TCP/IP protocol installed
-> Apache 2.x
-> PHP5 --recommended
-> MySQL --recommended
The last two are not vital in setting up a server, but I recommend downloading them too.
So let\'s get started! First we\'ll download Apache. (the latest stable version is: 2.2.3)

--- Installing Apache HTTP Server ---
-HTTP Server
-Download from a mirror
-Win 32 Binary (MSI Installer)
If you have problems downloading it, try a different mirror. After you have downloaded
it launch the setup. In the Server Information window fill these in:
-Domain name: localhost
-Server name: localhost
I recommend you installing it as a service. Later I\'ll show you how to disable the autostart.
Let\'s assume you have it installed in \'c:\\program files\\Apache software foundation\\\'.
And now we\'ll configure it to run properly! Now you can run Apache either from command line,
from [start]->[Programs]->[Apache HTTP Server]. So you have it installed as a service and
you don\'t want it to run every time you boot up. Go to [control panel]->[Administrative services]
->[services],right click on [Apache]->Properties->startup type->manual. Click [OK] and close it.
Run your Apache server: c:\\program files\\Apache software foundation\\bin\\ApacheMonitor or from
the tray bar. Open up your browser, and type in http://localhost/ or if this
won\'t work we are going to configure it.

--- Configuring the Server ---
c:\\program files\\Apache software foundation\\conf\\httpd.conf open with notepad
And edit these lines:
Listen 80 -> 8080 // this is the port on which you\'r server will listen
ServerName localhost:80 -> localhost:8080 // the domain name
Save the changes, and try http://localhost:8080/ or in your browser.
If you see a \'It works!\' heading you\'re done. If you see some kind of error, check: or search the bug with google.
View the error log: c:\\program files\\Apache software foundation\\logs\\error.log
Ask on a forum, or try doing it again. If you have it running let\'s continue with PHP5.

--- Installing PHP5 ---
-Windows binaries
-latest .zip package
After you have downloaded it extract it somewhere, let\'s say c:\\php
-rename php.ini-dist to php.ini then copy it to you\'r windows folder: c:\\windows
As you can see there is another ini file php.ini-recommended. The dist is used for developement
and the other is used for the real server. ( there\'s difference in the error reporting and things
like that).
-copy php5ts.dll to c:\\windows\\system32
And we are done with the installation.

--- Configuring PHP5 as an Apache module ---
c:\\program files\\Apache software foundation\\conf\\httpd.conf open with notepad
And edit these lines:
find \'AddType\' and append these lines after it:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

find \'LoadModule\' and append this line:
LoadModule php5_module \"c:/php/php5apache2.dll\" // forward slashed!!! and be sure the path is correct

--- Testin\' it!!! ---
Now create a file test.php:
echo \"I hope it works!\";

and place it to c:\\program files\\Apache software foundation\\htdocs
this is your server\'s root directory, it can be changed in the httpd.conf
To easily change it replace all occurences of it with the new root directory.
Now launch http://localhost/test.php ( and good luck :)
If it works you\'re lucky! If not try out all the dll\'s (in the LoadModule directive) which start with
php5apache in c:\\php or check the error.log. The one that worked for me is php5apache2_2.dll

--- End ---
That\'s all. From this point you should read the Apache documentation, google, wikipedia ...
Maybe I\'ll write another articles on this topic, like adding MySQL, config directives, .htaccess
files and things like that. I hope you enjoyed this article. And if you have any problem installing
Apache, remember that you have the WEB!!!


tancurromon December 10 2006 - 20:24:50
<?php phpinfo(); ?>

is a good test
garyson December 15 2006 - 05:19:59
Apache 2.0.59 is easier to configure with PHP than 2.2. Also, get Zend Optimizer at to speed up php applications
Post Comment


You must have completed the challenge Basic 1 and have 100 points or more, to be able to post.