"FORBIDDEN" error after installing WAMP 2.5
Posted by: mbsarino (---.fast.net.id)
Date: October 24, 2014 06:08PM

I installed WAMP 2.5 on our Windows 2008 server When I tried viewing from my browser I got a "Forbidden" error. However, if I view it from the server browser and view it as "localhost" or even the http address or the IP address, I can see the WAMPserver home page. Is there something I missed during installation??

Options: ReplyQuote
Re: "FORBIDDEN" error after installing WAMP 2.5
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: October 27, 2014 10:37AM

WAMPServer is designed as a development environment that runs on the PC where the developer is sitting.

For this reason Apache and MySQL CONFIGS are released with security in mind and everything is configured to just respond to connections from the machine running WAMPServer. It protects the beginner from accidental attack.


If you wish to install WAMPServer on an actual server and be allowed to access its Apache from other workstations on the network it is a simple change to allow this.

Edit httpd.conf and find this line
#   onlineoffline tag - don't remove
    Require local

Change it to something like this, where '192.168.1' is the first 3 quartiles of the subnets ip address's

#   onlineoffline tag - don't remove
    Require local
    Require ip 192.168.1


If you want to be able to use the instance of phpMyAdmin from other machines on the network you will also have to make this change :-

Edit \wamp\alias\phpmyadmin.conf

Alias /phpmyadmin "d:/wamp/apps/phpmyadmin4.1.14/"

<Directory "d:/wamp/apps/phpmyadmin4.1.14/">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
  <IfDefine APACHE24>
    Require local
  </IfDefine>
  <IfDefine !APACHE24>
    Order Deny,Allow
	  Deny from all
	  Allow from localhost ::1 127.0.0.1
	</IfDefine>
  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>

And add the extra instruction to Allow this to be accessed from the other ip addresses as well

Alias /phpmyadmin "d:/wamp/apps/phpmyadmin4.1.14/"

<Directory "d:/wamp/apps/phpmyadmin4.1.14/">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
  <IfDefine APACHE24>
    Require local


#--> add this line, with your subnet
    Require ip 192.168.1


  </IfDefine>
  <IfDefine !APACHE24>
    Order Deny,Allow
	  Deny from all
	  Allow from localhost ::1 127.0.0.1
	</IfDefine>
  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>



Of course it is best practice to create a Virtual Host for each of your projects, even if you only have one project. You would then make this change to just the Virtual Host or Hosts that you wanted to be visible on your internal network.


See WAMPServer 2.5 The Homepage, Your Projects Menu and the need for Virtual Hosts for more information on creating Virtual hosts in Apache.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 10/27/2014 10:41AM by RiggsFolly.

Options: ReplyQuote


Sorry, only registered users may post in this forum.