Menu

Local Test Server

Nik

Setting up a Local Test Server

Download WAMP:

[http://www.wampserver.com/en/download.php]

Modify the location of the files in the httpd.conf:

From WAMP go to Apache -> httpd.conf
Change the following 2 lines to match your web files location (should be from the Git synch):
DocumentRoot "d:/wamp/www/"
...
<Directory "d:/wamp/www/">
...
# Virtual hosts
Include conf/extra/httpd-vhosts.conf

&lt;Directory "cgi-bin"&gt;
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
&lt;/Directory&gt;

Remember to restart the server for the changes to take affect.

I normally use:
C:\Users\Nik\workspace
In this directory I will normally add a phpmyadmin directory, so that we can easily get to the mysql page.

Enable the rewrite module in Apache:

WAMP -> Apache -> rewrite_module
The Server should automatically restart

Add an Alias to our project in Apache:

Where econtriver.com would be our live website:
I normally have test.econtriver.com as a test server on the web.
I normally have dev.econtriver.com as a local test server.

Open the virtual host config file from the wamp install:
D:\wamp\bin\apache\Apache2.2.17\conf\extra\http-vhosts.conf
<virtualhost *:80="">
ServerName dev.econtriver.com
DocumentRoot C:\Users\nikc\workspace\econtriver\public</virtualhost>

        SetEnv APPLICATION_ENV "development"

        <Directory C:\Users\nikc\workspace\econtriver\public>
            DirectoryIndex index.php
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    </VirtualHost>

Then we need to tell Windows to point to this machine fi a user attempts to go to dev.econtriver.com:

Open:
C:\Windows\System32\drivers\etc\hosts
Add:
127.0.0.1 dev.econtriver.com


Related

Wiki: Home

MongoDB Logo MongoDB