0

I installed Magento 2 via Composer and after I followed the steps and it was installed I received this on the frontend: enter image description here

Basically all URLs go to 404 (admin as well). I am using Ubuntu 18 and Apache server. This is my virtual host configurations:

<VirtualHost *:80>
    ServerAdmin email@gmail.com
    ServerName m2.local
    ServerAlias www.m2.local
    DocumentRoot /var/www/html/magento2
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    <Directory /var/www/html/magento2>
        #Options Indexes FollowSymLinks
        Order Deny,Allow
        Allow from all
        #AllowOverride All
        #Require all granted
    </Directory>
</VirtualHost>

And this is my user, group and permissions:

drwxrwxr-x  6 magento magento   4096 Okt 21 18:55 app
-rw-rw-r--  1 magento magento    138 Okt 17 10:54 auth.json.sample
drwxrwxr-x  2 magento magento   4096 Okt 17 10:54 bin
-rw-rw-r--  1 magento magento 434977 Okt 17 10:54 CHANGELOG.md
-rw-rw-r--  1 magento magento  12673 Okt 17 10:54 composer.json
-rw-rw-r--  1 magento magento 336461 Okt 27 15:37 composer.lock
-rw-rw-r--  1 magento magento    650 Okt 17 10:54 COPYING.txt
drwxrwxr-x  5 magento magento   4096 Okt 21 18:54 dev
drwxrwxr-x  3 magento magento   4096 Okt 27 15:38 generated
-rw-rw-r--  1 magento magento     57 Okt 17 10:54 grunt-config.json.sample
-rw-rw-r--  1 magento magento   2994 Okt 17 10:54 Gruntfile.js.sample
-rw-rw-r--  1 magento magento   1370 Okt 21 19:01 index.php
drwxrwxr-x  4 magento magento   4096 Okt 21 18:54 lib
-rw-rw-r--  1 magento magento  10376 Okt 17 10:54 LICENSE_AFL.txt
-rw-rw-r--  1 magento magento  10364 Okt 17 10:54 LICENSE.txt
-rw-rw-r--  1 magento magento   5495 Okt 17 10:54 nginx.conf.sample
-rw-rw-r--  1 magento magento   1416 Okt 17 10:54 package.json.sample
-rw-rw-r--  1 magento magento    804 Okt 17 10:54 php.ini.sample
drwxrwxr-x  2 magento magento   4096 Okt 17 10:54 phpserver
drwxrwxr-x  6 magento magento   4096 Okt 17 10:54 pub
-rw-r--r--  1 magento magento      5 Okt 21 18:51 readme.md
-rw-rw-r--  1 magento magento   4191 Okt 17 10:54 README.md
drwxrwxr-x  7 magento magento   4096 Okt 17 10:54 setup
drwxrwxrwx  6 magento magento   4096 Okt 27 15:38 var
drwxrwxr-x 60 magento magento   4096 Okt 27 15:37 vendor

Also I followed up the permissions from the documentation:

cd <your Magento install dir>
find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} +
find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} +
chmod u+x bin/magento

Can someone give me an idea what I should try?

0

I found the issue. The mod_rewrite module was enabled. To check if it is enabled, you can use phpinfo(). To enable just use this command:

sudo a2enmod rewrite

and

systemctl restart apache2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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