How to enable apache to accept connections from outside in WAMP

WampServer refers to a software stack for the Microsoft Windows operating system, created by Romain Bourdon and consisting of the Apache web server, OpenSSL for SSL support, MySQL database and PHP programming language.

This article explains the steps to enable apache to accept outside connection in WAMP server.

Step1: Open the virtualhost config file.


Step2: Edit the Directory configuration of the vhost to allow access from the desired IP address(es).

<VirtualHost *:80>
  DocumentRoot "c:/wamp/www/example"
  ErrorLog "logs/"
  CustomLog "logs/" common
  <Directory "/">
    Deny from all
    Allow from
    Allow from ipaddress1
    Allow from ipaddress2
    <IfModule mod_headers.c>
      SetEnvIfNoCase Origin "https?://(www\.)?(example\.com)(:\d+)?$" AccessControlAllowOrigin=$0
      Header set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin

Step3: Save the updated vhost configuration and restart Apache.

Leave a Reply