Hosting Applications on Wamp Server

Run single file on Wamp

Once the wamp server is installed, a directory structure will be formed in the installed drive named wamp. To run your php file directly on wamp, what you need to do is place that file in the www directory of wamp and run localhost/fileName.php after starting the server.

Run application on Wamp [creating Virtual Host]

To run/ host an application on wamp, you need to follow the following steps :

  • You need to go to Drive:\wamp\bin\apache\Apache2.2.21\conf and edit httpd.conf file.
  • Copy the directoy structure :
    <Directory "c:/wamp/www/">
        # Possible values for the Options directive are "None", "All",
        # or any combination of:
        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
        # Note that "MultiViews" must be named *explicitly* --- "Options All"
        # doesn't give it to you.
        # The Options directive is both complicated and important.  Please see
        # for more information.
        Options Indexes FollowSymLinks
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        AllowOverride all
        # Controls who can get stuff from this server.
    #   onlineoffline tag - don't remove
        Order Deny,Allow
        Deny from all
        Allow from

    and change the path to your application eg: “/path/.

  • Make your server listen to a new port in the httpd.conf file
    Listen 82
  • Now create a virtual host for the same path by going to C:\wamp\bin\apache\Apache2.2.21\conf\extra in the file httpd-vhosts.conf file as follows :

    <VirtualHost *:82>
        DocumentRoot "path"
        ServerName localhost
        ErrorLog "logs/file.log"
        CustomLog "logs/file.log" common

Now the application is ready to be hosted and can be run as localhost:82

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>