Apache VirtualHost 403 Forbidden
Apache 2.4.3 (or maybe slightly earlier) added a new security feature that often results in this error. You would also see a log message of the form "client denied by server configuration". The feature is requiring a user identity to access a directory. It is turned on by DEFAULT in the httpd.conf that ships with Apache. You can see the enabling of the feature with the directive
Require all denied
This basically says to deny access to all users. To fix this problem, either remove the denied directive (or much better) add the following directive to the directories you want to grant access to:
Require all granted
as in
<Directory "your directory here">
Order allow,deny
Allow from all
# New directive needed in Apache 2.4.3:
Require all granted
</Directory>
Adding VirtualHost fails: Access Forbidden Error 403 (XAMPP) (Windows 7)
Okay: This is what I did now and it's solved:
My httpd-vhosts.conf
looks like this now:
<VirtualHost dropbox.local:80>
DocumentRoot "E:/Documenten/Dropbox/Dropbox/dummy-htdocs"
ServerName dropbox.local
ErrorLog "logs/dropbox.local-error.log"
CustomLog "logs/dropbox.local-access.log" combined
<Directory "E:/Documenten/Dropbox/Dropbox/dummy-htdocs">
# AllowOverride All # Deprecated
# Order Allow,Deny # Deprecated
# Allow from all # Deprecated
# --New way of doing it
Require all granted
</Directory>
</VirtualHost>
First, I saw that it's necessary to have set the <Directory xx:xx>
options. So I put the <Directory > [..] </Directory>
-part INSIDE the <VirtualHost > [..] </VirtualHost>
.
After that, I added AllowOverride AuthConfig Indexes
to the <Directory>
options.
Now http://localhost
also points to the dropbox-virtualhost. So I added dropbox.local
to <VirtualHost *:80>
which makes it as <VirtualHost dropbox.local:80>
FINALLY it works :D!
I'm a happy man! :) :)
I hope someone else can use this information.
403 Forbidden - Permission - VHOSTS
(Posted on behalf of the OP).
After upgrading my mac, my php switcher wasn't working cause by the php7_module which wasn't called in the httpd.conf.
Apache 403 forbidden on allow from all Directory - virtualhosts
Apache VirtualHost 403 Forbidden
Is what fixed it. Quote from answer:
Apache 2.4.3 (or maybe slightly earlier) added a new security feature
that often results in this error. You would also see a log message of
the form "client denied by server configuration". The feature is
requiring a user identity to access a directory. It is turned on by
DEFAULT in the httpd.conf that ships with Apache. You can see the
enabling of the feature with the directive
I needed to add Require all granted
in <Directory></Directory>
Related Topics
What's the Magic of "-" (A Dash) in Command-Line Parameters
Environment Variable Substitution in Sed
What Happens If You Use the 32-Bit Int 0X80 Linux Abi in 64-Bit Code
How to Prevent a Background Process from Being Stopped After Closing Ssh Client in Linux
How Do So_Reuseaddr and So_Reuseport Differ
How to Pass Command Output as Multiple Arguments to Another Command
How to Convert Dos/Windows Newline (Crlf) to Unix Newline (Lf)
How Does "Cat ≪≪ Eof" Work in Bash
How to Store a Command in a Variable in a Shell Script
Linux Blocking Vs. Non Blocking Serial Read
How to Get Cron to Call in the Correct Paths
How to Search For a Multiline Pattern in a File
How to Send a File as an Email Attachment Using Linux Command Line
What Happens to an Open File Handle on Linux If the Pointed File Gets Moved or Deleted
How to Redirect Output to a File and Stdout
How to Print a Character in Linux X86 Nasm