Thursday, 21 March 2019

Allow access of WAMP server from another system (Forbidden : You don't have permission to access / on this server.)

When we install WAMP server on new system, if it is installed successfully, it works fine on system, but when we try to access it from another system we got error like-



Let see how it can be resolved ?

For WAMP server > 3

Click on WAMP icon in the tray of icons situated in right hand side of task bar. Then click on Apache -------> httpd-vhosts.conf



httpd-vhosts.conf file will be opened with following text -

# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>

Change Requie local line to Require all granted

Now httpd-vhosts.conf will look like -

# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
   Require all granted
  </Directory>
</VirtualHost>

Then save the file and restart the server.

You should also check the colour of WAMP server icon in tray, it should be green.

For WAMP server < 3


If you have installed WAMP server version less than 3, the you have to change in httpd.conf file and search offlineonline tag in the file and replace it from

#   onlineoffline tag - don't remove
    Order Deny, Allow
    Deny from all

to


#   onlineoffline tag - don't remove
    Order Allow,Deny
    Allow from all

and save the file then restart the server.

Another way to resolve it to check that server is offline or online.

Click on WAMP icon in tray and the click on Put Online (See the WAMP icon in Offline Mode and Online mode, there is a change in icon)





No comments:

Post a Comment

Change image source dynamically on hyperlink

 Changing image source dynamically using JQuery. Here in this example I have created there hyperlink and stored all images in the same folde...