Forbidden You don't have permission to access / on this server - apache

I'm trying to set up a webserver on my VPS (Running Debian 7). I have installed apache and configured it. However, when I try to connect to my IP I am faced with a 403 forbidden error saying that I don't have access to / on the server. I have attempted to set it up so that when connecting the webserver should direct to the directory: /home/webmaster/website. My main apache.conf file is as follows: http://pastebin.com/zgyik39y
and my site config, called "web.conf" is: http://pastebin.com/jpRJAaCw I don't know what to do, I've tried many suggestions on here and in other places and none so far have worked.

Line 18 of web.conf should be:
Allow from all
For apache 2.2 or:
Require all granted
For apache 2.4

Related

AH01630: client denied by server configuration but require all granted is set (Apache 2.4, CentOs)

I am using Apache 2.4 on CentOs to power my website. However, I always get a 403 forbidden error when trying to access the website through my browser. When I consulted the file error_log in the log directory of /etc/httpd, I repeatedly see the error:
AH01630: client denied by server configuration
I have read in the Internet as well as in multiple StackOverflow questions that you can solve this error with Require all granted in the html directory configuration of the httpd.conf file (/etc/httpd/conf/).
I have configurated this directory (through which I am hosting my website) like recommended above (it was already configurated). The error persists, so there must be another problem in the server configuration that denies access to my website. My httpd.conf file is not changed at all, it is the default file that gets downloaded when installing Apache 2.4. Does anybody know why this error occurs? Can somebody explain to me what else can cause this error? I have looked everywhere in the internet for this error (links below) but nothing could help me at this problem.
I have no .htaccess file in my website. Only an index.html file to test it.
Stack Overflow Question: "Apache2: 'AH01630: client denied by server configuration'"
Apache Wiki
Serverfault
I just deleted the whole HTTPD configuration and then reinstalled Apache. I had to enable PHP too by using these lines of code:
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Then Apache worked flawlessly.

Receive forbidden message when trying to access my website

When trying to load my website I receive the following message.
Forbidden
You don't have permission to access / on this server.
Apache/2.4.18 (Ubuntu) Server at www.xxx.com Port 80
Please note I am complete novice to this so any guidance would be amazing!!
Without more information; A couple of possible things to look at:
1)
Check permissions on the directory you are hosting the web files (usually under /var/www). See this link for adding your user to www-data group etc..
https://askubuntu.com/questions/162866/correct-permissions-for-var-www-and-wordpress
2)
Issue in Apache config. Discussed here:
WAMP : Forbidden You don't have permission to access / on this server. Apache/2.4.18 (Win64) PHP/5.6.19
Just change the permission of that directory in which you have your project files
type chmod 777 directory-name

Forbidden: You don't have permission to access / on this server, LAMP Server on Fedora 22

I have been installed LAMP server on Fedora 22 , but when i need access
my server localhost/myapp/public , I see this error
Forbidden
You don't have permission to access /myapp/public/ on this server.
Server unable to read htaccess file, denying access to be safe
How I can solve this isuue, I think this issue may be solving by modify
httpd.conf file ,but i don't know How do it , i am use apache2
Any Suggestions ?
You should have a corresponding error_log acess referencing an on-disk htaccess file.
If you use the "itk" MPM, it's likely an ITK problem. Otherwise, make sure all directories between root and your content directory are world readable and world executable, and that any .htaccess files are readable by the servers ID (www-data, apache, etc)

403 Apache error Forbidden You don't have permission to access /clientServerTest/ on this server

I am trying to connect to my wampserver 2.4 online but I have the following error:
Forbidden You don't have permission to access /clientServerTest/ on this server.
The error log shows:
[Sun Jun 08 21:53:45.281433 2014] [access_compat:error] [pid 6696:tid 1492] [client 192.168.0.7:52659] AH01797: client denied by server configuration: C:/wamp/www/favicon.ico
I have browsed a while and looked at this answer and this other one but no luck so far.
The server is already online and I can access it just fine using localhost. However, when I try to connect to it using the ipv4 of my pc on my local network I got the error.
I am using windows 7.
The firewall is already off.
Can anybody please help me out on this?
A better solution would be to do
# onlineoffline tag - don't remove
Require local
Require ip 192.168.0
Or whatever the first 3 quartiles of your local subnet is.
This uses the Apache 2.4 syntax rather than the Apache 2.2 syntax, and gives access to all the possible localhost variants and the local network, but not the world.
This way when you decide to open up your router you wont accidentally allow acccess to the world to all your development sites.
You will have to do this to all 3 app configs in the alias folder.
Ah... apparently I am found what was wrong...
In the httpd.config file in the following snippet (can access from the wamp menu):
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
I removed Deny form all and put in Allow from all so now it looks like:
# onlineoffline tag - don't remove
Order Deny,Allow
Allow from all
Not sure it is the right solution... but at least I can connect

Apache & Nginx in Same Directory

I want to use Apache and Nginx in the same directory:
nginx root /home/admin/tv;
Apache DocumentRoot domain root /home/admin/tv;
I set the same directory but when I go to the Nginx addreess
ip:777 i got 403 Forbidden nginx/0.8.54
I finally change the permission and it works.
There's no reason you can't run one of each. They just have to bind to different sockets. The 403 error is because you configured permissions incorrectly.
I was playing with this earlier, I have apache and nginx and testing both on my server. you should be able to use the same directory with existing sites as long as you make the changes in your virutal host of both to reflect you chosen directory. I don't think you can run both at the same time though.