1

I have a virtual host configure in my httpd-vhosts.conf, and when i enable (uncommented) virtual hosts on httpd.conf and try to access localhost or any link inside local that is not configured in v-host, always show me Forbidden You don't have permission to access this resource.

(httpd-vhosts.conf)


    <VirtualHost *:80>
        ServerName workshop.test
        ServerAlias www.workshop.test
        DocumentRoot "C:/Apache24/htdocs/workshop/workshop_app/public"
        ErrorLog "logs/workshop.test-error.log"
        CustomLog "logs/workshop.test-access.log" common
    </VirtualHost>

(httpd.conf)

    Include conf/extra/httpd-vhosts.conf
John Conde
  • 217,595
  • 99
  • 455
  • 496
Jair
  • 11
  • 2
  • Does this answer your question? [XAMPP Windows Apache VirtualHost 403 Forbidden](https://stackoverflow.com/questions/14448334/xampp-windows-apache-virtualhost-403-forbidden) – Omar Al-Howeiti Feb 27 '21 at 13:27

1 Answers1

1

Add this within your workshop.test vhost block:

<Directory "C:/Apache24/htdocs/workshop/workshop_app/public">
    DirectoryIndex index.php
    Options Indexes FollowSymLinks ExecCGI Includes
    AllowOverride All
    Require all granted
</Directory>
biesior
  • 55,576
  • 10
  • 125
  • 182
  • I try this but the problem still there. If i use virtual hosts i'm not able to use localhost link like (localhost/phpmyadmin) always return Forbidden You don't have permission to access this resource – Jair Feb 27 '21 at 19:32
  • In `httpd.conf` did you set proper values for `User` and `Group`? – biesior Feb 27 '21 at 19:39
  • I don't change this things in httpd.conf, how should i configure it? – Jair Feb 27 '21 at 19:48
  • It need be your username and main group you belong to – biesior Feb 27 '21 at 20:09