David Slack - Web developer

Local Server on Windows: WAMP

If you want a local server to create your web sites on your home computer to test them before sending them out into the real world then WAMP is for you. When you have it all set up you simply drag a folder into the www folder and go to localhost/FOLDER-NAME to see the site. This will run all the PHP as server side. If you don't want to use the www folder then you'll also want to set up virtual hosts. Keep reading if this is what your looking for.

WAMP is Windows Apache MySQL and PHP all rolled into one. You can add extensions and modules to PHP and Apache and change the even change the version of PHP you want to use. To set it up:

  1. Set up your operationg system as you like (Windows 7, Vista, XP) with all your programmes
  2. Set up your folders for your work eg /My Documents/Work/C/Company name/Website/
  3. Install WampServer
  4. Open your http.comf file
    Mine is at W:\wamp\bin\apache\Apache2.2.17\conf\httpd.conf
  5. Uncomment the virtual hosts include so
    # Virtual hosts
    # Include conf/extra/httpd-vhosts.conf
  6. becomes

    # Virtual hosts
    Include conf/extra/httpd-vhosts.conf
  7. Save the file
  8. Open your windows host file.
    Usually at C:\WINDOWS\system32\drivers\etc\hosts
  9. Add the name you want to use for your virtual host at the bottom

    127.0.0.1 MY-WEBSITE.local

    NB. You may have to open Notepad as Administrator to do this
  10. Now open your httpd-vhosts.conf file.
    Mine was at W:\wamp\bin\apache\Apache2.2.17\conf\extra\httpd-vhosts.conf
  11. Change the VirtualHost blocks to what you need like:

    <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot "c:/wamp/www"
    ServerName localhos
    ServerAlias localhost
    ErrorLog "logs/localhost-error.log"
    CustomLog "logs/localhost-error.log" common
    </VirtualHost>

    <VirtualHost *:80>
    ServerAdmin webmaster@dave
    DocumentRoot "X:\Documents\Websites\YOUR-WEBSITE\Website"
    ServerName YOUR-WEBSITE.local
    ServerAlias www.YOUR-WEBSITE.local
    ErrorLog "logs/YOUR-WEBSITE-error.log"
    CustomLog "logs/YOUR-WEBSITE-error.log" common
    <directory "X:\Documents\Websites\YOUR-WEBSITE\Website">
     Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Deny from All
    Allow from 127.0.0.1
    </directory>
    </VirtualHost>

  12. Restart WanmpServer by clicking on the icon in the taskbar and clicking "Restart All Services"
  13. Wait until the icon goes green
  14. Go to YOUR-WEBSITE.local in your browser

After everything is working the first thing you want to enable is the Mod re-write. to do this:

  1. Click on the Green icon for WAMP in your task bar
  2. Mouse-over Apache->Apache Modules
  3. Click rewrite module
  4. Wait for the Icon to turn green again

Now if you set up a project in Zend studio, Dreamwever or whatever you will have access on your own server before you upload the files

Latest content

There are lots of developers out there with varying degrees of experience and expertise, some mid level, some junior and some senior. Some...
First thoughts are Symfony is ace!Only been using Symfony for 1 project but the amount of coding it has saved has been worth the time spent...
The Lost and Found website was built by myself (David Slack) and designed by Arm & Eye.The site was created to promote a bar and...

Social networks

Contact me here or catch me on one of
the social networks below


What I'm listening to

Off-site News

My blog

Wednesday, 2 August, 2017 - 06:56
There are lots of developers out there with varying degrees of experience and expertise, some mid level, some junior and some senior. Some developers...
Tuesday, 5 March, 2013 - 09:49
First thoughts are Symfony is ace!Only been using Symfony for 1 project but the amount of coding it has saved has been worth the time spent learning...
Monday, 3 December, 2012 - 10:07
As a web developer and web designer I need to take into account everything on a site from SEO, marketing, usability across devices, the look and feel...

Try this on your mobile

Use your QR reader to read this

You should be able to use this right from the screen

Latest tweets

Calendar

M T W T F S S
 
 
 
 
 
 
1
 
2
 
3
 
4
 
5
 
6
 
7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29
 
30
 
31
 
 
 
 
 
 

You are here

Back to top

Copyright David Slack - Web developer