I just installed a version of XAMPP xampp-osx-5.5.38 -3-installer.dmg .
Then I followed the instructions to set up a virtual host. I enabled Include etc/extra/httpd-vhosts.conf
and created 127.0.0.1 md-test.com
within /etc/hosts
.
So when I write md-test.com
I'm redirected to md-test.com/dashboard/
, as expected. I'm redirected to the xampp htdocs directory and loads the dashboard.
In /Applications/XAMPP/htdocs
I created a folder called md
drwxrwxr-x 3 root admin 102 21 Aug 12:02 md
, where I have an index.php file (echo "testok";).
For the httpd-vhosts.conf file this is what I did:
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/htdocs/md/"
ServerName md-test.com
</VirtualHost>
Now when I run md-test.com/
I'm not redirected to md-test.com/dashboard/
or even using localhost
that does not redirect me to localhost/dashboard/
. It only shows an error:
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
md-test.com
Apache/2.4.23 (Unix) OpenSSL/1.0.2j PHP/5.5.38 mod_perl/2.0.8-dev Perl/v5.16.3
I used visual studio to edit the files.
Now even when I delete the changes I made in httpd-vhosts.conf
I continue with the error. And this happens for any access in the apache of any url.
I checked the permissions of httpd-vhosts.conf
and continue the same as before.
-rw-rw-r-- 1 root admin 1489 22 Aug 11:44 httpd-vhosts.conf
Any idea what this error is?
UPDATE:
I found a possible error:
When I setup vhosts inside the link Include etc/extra/httpd-vhosts.conf
. even when I use full path ( Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf
) I still have the error.