-3

In this guideline from Magento2 there are talking about how to solve the 403 forbidden errors for Apache 2.4, and they are saying that I have to put this:

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride <value from Apache site>
    Order allow,deny
    Require all granted
</Directory>

in "your Apache configuration or your virtual host configuration". Now my questions:

1. where is that Apache configuration file? and/or where is my virtual host configuration file?
2. in the above tag, what is the value of "<value from Apache site>"? where can I find it?

Please note that my Magento2 directory is "/var/www/Magento2"

Thanks in advance :)

1
  • This varies from system to system. Ask your hoster or add information about your operating system. Apr 5, 2016 at 10:23

1 Answer 1

0

make sure you have permissions correct, before you set Require all granted.
ususally AllowOverride <value from Apache site> = AllowOverride All


to find your config:

httpd -V | grep SERVER_CONFIG

or like this

httpd -S

https://httpd.apache.org/docs/2.2/mod/core.html#directory

5
  • when I'm running any of the commands you have posted, I am getting: "No command 'httpd' found, did you mean" then it list another three commands..... just to make it clear, I am asking about where to place that <Directory /var/www/> tag ... do those commands return the path of that file?
    – Whaaaaat
    Feb 25, 2016 at 10:14
  • find your apache binary and use these commands then
    – MagenX
    Feb 25, 2016 at 13:31
  • YMMV of course but for Apache 2.4, look here: /etc/apache2/sites-available/000-default.conf. For Apache 2.2, look here: /etc/httpd/conf/httpd.conf Feb 25, 2016 at 23:39
  • Thanks Steve... but where exactly in that file I should put that tag? at the end? or it does not matter!.... please execuse me but I'm so shallow in this :(
    – Whaaaaat
    Feb 26, 2016 at 19:26
  • Add it to the appropriate <Directory> directive, such as the one you show in your original comment. Feb 28, 2016 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.