I am using apache 2.4 on amazon ec2.
I have server configuration in httpd.conf as below.
<Directory />
AllowOverride none
Require all denied
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
But I am getting error AH01630: client denied by server configuration: in apache log console.
Also referfed too many article. They are giving same solution as above.
Please give me solution if any
I know there have been a lot of questions regarding this topic, but I still was not able to get it to work.
I've set up a Wordpress site and a virtual host for that site locally on my notebook (via Wamp 3.1) and now I want to access it from another PC on the same network. On the localhost everything works fine.
My httpd-vhosts.conf file looks like this:
# Virtual Hosts
#
#Wamp
<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>
#Hp1
<VirtualHost *:80>
ServerName hp1.local
DocumentRoot "d:/wamp64/www/hp1"
<Directory "d:/wamp64/www/hp1">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
Require ip 192.168.100.76
</Directory>
</VirtualHost>
I've added 192.168.100.88 hp1.local (the ip of notebook) to my PC's host file. 192.168.100.76 is the ip of my PC.
I can ping my PC from my notebook and vice versa.
I've tried to access the site via
http://192.168.100.88
and
http://hp1.local
But to no avail. Not even a 403 or anything, just
Error: network timeout
Edit:
Thinks I've tried:
Put an inbound rule for port 80 in place (on my PC)
Deactivated the firewall (on my PC)
Added Apaches httpd.exe to my hosts firewall exceptions (solution)
Windows Firewall is likely blocking incoming connections from Apache. Add an exception for Wamp's incoming traffic (or just turn it off, but doing so would be bad for security).
Before I start.. Good day to all! :)
I have problem with my WAMP virtual host.. the other computer on our LAN keeps receiving error forbidden-you-dont-have-permission-to-access-on-this-server..
Below is the current settings I have:
/httpd.conf
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
Options FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "c:/wamp/www"
<Directory "c:/wamp/www">
Options Indexes FollowSymLinks
AllowOverride All
Order Deny,Allow
Allow from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost
</Directory>
/phpmyadmin.conf
Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.0.4/"
# to give access to phpmyadmin from outside
# replace the lines
#
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#
# by
#
# Order Allow,Deny
# Allow from all
#
<Directory "c:/wamp/apps/phpmyadmin4.0.4/">
Options Indexes FollowSymLinks ExecCGI
AllowOverride all
Order Deny,Allow
Allow from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost
</Directory>
/httpd.vhosts.conf
Listen 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
ServerName www.ecommerce.local
ServerAlias ecommerce.local
DocumentRoot C:/wamp/www/ecommerce
ErrorLog "C:/wamp/www/ecommerce/logs/error.log"
CustomLog "C:/wamp/www/ecommerce/logs/access.log" common
<Directory />
Require all granted
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost 127.0.0.1:80>
ServerName localhost
DocumentRoot C:/wamp/www/
</VirtualHost>
Also...
tried to ping from other computer response is success
tried to turn off firewall for both computer
tried to add everyone in www's folder properties
I have tried other solutions I found but still to no avail.. I can access "http://ecommerce.local" but the other computer on our LAN recieves forbidden-you-dont-have-permission-to-access-on-this-server error..
does it have something to do with our network settings? the other computer is also in the same settings... my ip: 192.168.1.198 and the other computer is 192.168.1.192
Access to Apache has nothing to do with windows access rights on a Windows system. Its all to do with what you tell Apache to allow in.
Also you are using a mixture of Apache 2.2 and Apache 2.4 syntax in most of your access declarations.
Apache 2.2
Allow .....
Apache 2.4
Require .....
Require local - means 127.0.0.1 and localhost and ::1
Require ip - specifies a single ip (192.168.0.10) or a range of ip's (192.168.0)
Apache does not seem to complain yet, but its probably best to stick to the Apache 2.4 syntax.
This first change you made is very dangerous and should be changed to this unless you really wanted to give unlimited access to the servers C:\ drive to anyone that hacks your Apache server.
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
Options FollowSymLinks Includes
AllowOverride All
Require all denied
</Directory>
Again here use Apache 2.4 syntax and be specific about who you want to allow in.
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "c:/wamp/www"
<Directory "c:/wamp/www">
Options Indexes FollowSymLinks
AllowOverride All
Require local
Require ip 192.168.0
</Directory>
Now to your Virtual Host definitions
You dont need this Listen 127.0.0.1:80
Put the localhost definition first so it becomes the default domain, so if a random or misspelt domain name is used this will load. If that comes from an internet ip then they will get an error as only ip's from within you network are allowed access. This isreally for later when you decide to open up your site to a wider audience.
Also dont specify 127.0.0.1 on the line, you want it to be listen any incoming ip not just this machine.
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/wamp/www"
<Directory "c:/wamp/www">
Options Indexes FollowSymLinks
AllowOverride All
Require local
## May not want to let people access the wamp page so leave this off if not.
Require ip 192.168.0
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.ecommerce.local
ServerAlias ecommerce.local
DocumentRoot "C:/wamp/www/ecommerce"
## not a good idea to have logs visible under the DocumentRoot folder
## should really go in C:\wamp\logs
## But I assume you want developers to have easy access during development
## ErrorLog "C:/wamp/logs/ecommerce_error.log"
## CustomLog "C:/wamp/logs/ecommerce_access.log" common
ErrorLog "C:/wamp/www/ecommerce/logs/error.log"
CustomLog "C:/wamp/www/ecommerce/logs/access.log" common
<Directory />
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require local
Require ip 192.168.0
</Directory>
</VirtualHost>
Now you may want to allow your local developers access to phpMyAdmin. If so you will need to change your C:\wamp\alias\phpmyadmin.conf file as well.
<Directory "c:/wamp/apps/phpmyadmin4.0.4/">
Options Indexes FollowSymLinks ExecCGI
AllowOverride all
Require local
Require ip 192.168.0
</Directory>
Or you could be more specific here and only allow certain ip's to use phpMyAdmin by using something like this
Require ip 192.168.0.10 192.168.0.11 192.168.0.12
Just as a side note. I personally like to move my VistualHosts sites completely out of the C:\wamp\ folder structure. So I would have placed my ecommerce folder somewhere like C:\websites\ecommerce\www\. This keeps any confusion about access rights to a complete minimum and also if I need to upgrade WAMP, my website code is never in any danger when I make a silly typo.
ADDITIONAL INFO:
Now to be able to access your new site as ecommerce.local or www.ecommerce.local you will have to make a chnage to your HOSTS file.
C:\windows\system32\drivers\etc\hosts
On the PC running WAMP add this line:
127.0.0.1 ecommerce.local
On the other PC's do this
192.168.0.10 ecommerce.local
Where 192.168.0.10 is the ip address of the PC running WAMP
Then reboot the PC's or do these 2 commands from a command window started as Administrator
net stop "DNS Client"
net start "DNS Client"
I have already solved my own issue... I have not shared my folder for anyone to view... so what I did is:
Right Click the project folder
On folder options go to sharing tab
Click on advance sharing
advance sharing option will open then tick share this folder
click permissions
permissions option will open then choose whom you would like to share your folder
I chose everyone then below tick full control (*for trial purposes only; recommended tick only Read)
then click ok for all the opened options
I have installed WAMP in my system and http://localhost is working nicely.
but when i got 127.0.0.1 then it gives Forbidden error:
Forbidden
You don't have permission to access / on this server.
I don't know what is this error for
in httpd.config i have give permission to allow all:
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Allow from all
Allow from 127.0.0.1
</Directory>
and if i set in my host file
127.0.0.1 localhost
127.0.0.1 test
and access test it gives same error. Any suggestion would be appreciated.thanks
The correct syntax for Apache 2.4.x is
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
Now if you did not actually want to give access to your site while you develop it to the whole internet a better method would be
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
Require local
</Directory>
The require local covers localhost, 127.0.0.1 and ::1. ::1 is the IPV6 equivalent of 127.0.0.1
If you want to be able to access the WAMPServer (Apache) from other PC's on your local network then you can include this line as well
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
Require local
Require ip 192.168.0
</Directory>
Note: I used only the first 3 quartiles of the normal 4 quartile set, this gives access to any ip on your internal subnet.
You will have to check what your actual subnet is as 192.168.0.x is a default but not for all home routers.
Can i suggest you read this document and make the required fixes for the WAMPServer 2.4 release. Make each change one by one and make sure that Apache and MySQL start again after each change so you can know where you make any mistakes, as they happen, rather than doing them all in one go!
Hi Friends previously I am using XAMP Server but when I install joomla Templates it creates alots of error. Now I installed the WAMP, but the issues are:
1. I can access with 127.0.0.1, but I cant access with "localhost".
2 When i access phpmyadmin i get this error.
Forbidden You don't have permission to access /phpmyadmin/ on this server.
Alias /phpmyadmin "c:/wamp/apps/phpmyadmin3.4.5/"
# to give access to phpmyadmin from outside
# replace the lines
#
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#
# by
#
# Order Allow,Deny
# Allow from all
#
After changing, it will look like this
<Directory "c:/wamp/apps/phpmyadmin3.4.5/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
After this just restart Wamp
Go to C:\wamp\alias. Open the file phpmyadmin.conf and change
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
to
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
problem solved
Change httpd.conf file as follows:
from
<Directory />
AllowOverride none
Require all denied
</Directory>
to
<Directory />
AllowOverride none
Require all granted
</Directory>
So none of the above stuff worked for me. Except this:
edit httpd.conf,
find the line
Listen 80
and change to
listen 0.0.0.0:80
if you are running windows 8, its got something to do with using ipv6 instead of ipv4
Go to C:\wamp\alias.
Open the file phpmyadmin.conf and add
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from MACHINE_IP
Change in following file \bin\apache\apache2.2.22\conf\httpd.conf
Replace Listen 80 with Listen 0.0.0.0:80
Replace
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
with
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
Replace
onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
with
onlineoffline tag - don't remove
Order Deny,Allow
Allow from all
Allow from 127.0.0.1
in \wamp\alias\phpmyadmin.conf
replace
<Directory "c:/wamp/apps/phpmyadmin3.4.10.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
with
<Directory "c:/wamp/apps/phpmyadmin3.4.10.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
</Directory>
Tested on windows localhost.
Note : Please consider RigsFolly's comment also.
For WampServer 2.2 with Apache 2.4.2 I ended up with:
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require local
To solve this, I opened httpd.conf and changed the following line:
Allow from 127.0.0.1
to:
Allow from 127.0.0.1 ::1
I faced this problem
Forbidden You don't have permission to access /phpmyadmin/ on this server
Some help about this:
First check you installed a fresh wamp or replace the existing one. If it's fresh there is no problem, For done existing installation.
Follow these steps.
Open your wamp\bin\mysql directory
Check if in this folder there is another folder of mysql with different name, if exists delete it.
enter to remain mysql folder and delete files with duplication.
start your wamp server again. Wamp will be working.
just add following line in wamp/alias/phpmyadmin.conf
Allow from ::1
so it will look something like this depending your phpmyadmin version.
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
</Directory>
If its possible uninstall wamp then run installation as administrator then change you mysql.conf file like that
<Directory "c:/wamp/apps/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
Allow from all
</Directory>
Not: Before I reinstall as admin the solution above didn't work for me
Change the file content of c:\wamp\alias\phpmyadmin.conf to the following.
<Directory "c:/wamp/apps/phpmyadmin3.4.5/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
Here my WAMP installation is in the c:\wamp folder. Change it according to your installation.
Previously, it was like this:
<Directory "c:/wamp/apps/phpmyadmin3.4.5/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
Restart your Apache server after making these changes.
In your apache config file (../bin/apachex.y.z/cong/httpd.conf)
Just change
< Directory "c:/wamp/www/" >
...
...
"Require local" ===> "Require all granted"
< /Directory >
This allows other pc's to access (to read) your web folder.
I had done below changes for new phpmyadmin4.0.4 in httpd.conf file
<Directory />
AllowOverride none
Require all granted
</Directory>
and phpmyadmin.conf
<Directory "c:/wamp/apps/phpmyadmin4.0.4/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
and restart my server.
None of the above answers worked for me, or where unsafe (as some pointed out, using Allow from all can make your files and data accessible to the outside world).
Open the c:\wamp\alias\phpmyadmin.conf file and change
Allow from 127.0.0.1
to
Allow from 127.0.0.1 ::1
Explanation:
On most computer systems, localhost resolves to the IP address 127.0.0.1, which is the most commonly used IPv4 loopback address, and to the IPv6 loopback address ::1 (source: https://en.wikipedia.org/wiki/Localhost)
The resolution of the name localhost into one or more IP addresses is configured by the following lines in the operating system's hosts file:
127.0.0.1 localhost
::1 localhost
to see your hosts file, go to c:\Windows\System32\drivers\etc\HOSTS
notice the above lines are commented out with the note: # localhost name resolution is handled within DNS itself.
On my machine, on Win7, I also noticed the following:
localhost\phpmyadmin did not work on Chrome, but worked on IE11
127.0.0.1\phpmyadmin worked on Chrome
comment Require local from httpd.conf
"#Require local"