Showing results for 
Search instead for 
Did you mean: 

"403 Forbidden" error page when trying to open Magento 2 installation page

"403 Forbidden" error page when trying to open Magento 2 installation page

Hello experts,

I'm trying to install Magento 2 on a Godaddy Ubuntu virtual machine. After following what is in the installation manual (hopefully), and when I reached to the step of opening the setup page of the Magento 2 installation, I'm getting the following error:


"403 Forbidden" page


However, after I installed Apache I tried to open "http://<the IP address of the VM>", and it successfully opened the default page of Apache.


The following is the configuration in '/etc/apache2/sites-available/000-default.conf' :



<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/magento2
        #DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
<Directory /var/www/magento2>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Require all granted


And permission on /var/www/magento2 folder is as follows:


find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento


What did I miss in my configuration? how can that be fixed?