Blog

Tutorial: Manually Install WAMP (Windows 8, Apache, MySQL, PHP) with Network Storage (NAS)

Posted by david on 14 June 2014 at 2:43 pm
I recently bought a new laptop that shipped with Windows 8.  After some difficulty setting it up for PHP development, I decided to do a manual setup.  Keep in mind this was with binaries, I didn't compile from source.
Here's how I did it:

Apache 2.4 -
  • PHP.net recommends downloading from apachelounge.com.
  • The version I downloaded was Apache 2.4.9 Win64
    • Get the latest version available.
The download is a zip file, once it's completed extract the files.  I tend to upgrade kind of often, so I decided to use my home folder for the install.  I simply created a Servers folder in my user home folder.  You can put t where ever you like. My Apache folder is: C:\Users\david\Servers\Apache24, which I named because if i test Apache 2.5, I will likely leave 2.4 just in case.

Now navigate to [apache]\conf and open httpd.conf. Scroll down to ServerRoot and set it to the path you have placed your Apache files.  Mine is: ServerRoot "C:/Users/david/Servers/Apache24".  This is the folder your Apache server is currently residing, not where you want to serve files from. 

Now scroll down until you see a lot of LoadModule lines. You'll notice a lot of these are commented (#).  Remove the comment in front of the ones you want to activate.  LoadModule rewrite_module modules/mod_rewrite.so was the only one I needed at the time, so I enabled that one.

Scroll down to DocumentRoot.  This is where you will serve file from, in my case it's a network hard drive.  If you want to serve from a local disk, you wrap the path in quotes, if not, then you don't.  Mine is set to a network drive: DocumentRoot //mybooklive/www/htdocs.  Generally your DocumentRoot would be something like: DocumentRoot "C:/Users/david/Servers/Apache24/htdocs".  

The line below that one should begin with <Directory, simply replace/append your new path to it: <Directory "C:/Users/david/Servers/Apache24/htdocs">.  Below you will see AllowOverride, if you want to use .htaccess files, set it to AllowOverride All, if not then leave it alone.

Further down the file you will find a <Directory line that has cgi-bin, modify it to show your DocumentRoot, with ci-bin at the end (even if you aren't planning to use it -- just in case).

That's all for Apache setup (for now).  Later we will add a few lines for PHP support, but we're not there yet.  Add an index.html file (if you aren't using the default) to your document root and add some text that says It Works! or something like that (mine said: NASSSSSSSSSS, yeah!). Now open the httpd.exe file from your [apache]\bin folder, then navigate to localhost in your browser.  Hopefully it works... 

to be continued....

Comments

Log in to comment

No comments yet!