0

Ducument root is /var/www/html

Magento root is /var/www/html/magento

I tried the virtual directory like

VirtualHost *:80>
    DocumentRoot /var/www/html/magento
    <Directory /var/www/html/magento>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
    </Directory>
</VirtualHost>

But this broke my frontend page and admin page.

  • You need Set require all granted: <Directory /var/www/html/magento> Require all granted </Directory> after that static content deploy and flush the cache using this command: php bin/magento setup:static-content:deploy php bin/magento cache:flush – shail Jul 13 '18 at 4:53
  • It didn't work. – stevieki Jul 13 '18 at 5:22
0

This one is working for me.

<VirtualHost *:80>
    ServerAdmin magento2@test.com
    ServerName magento2.local.com
    ServerAlias www.magento2.local.com
    DocumentRoot /var/www/html/magento21
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    <Directory /var/www/html/magento21>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
   </Directory>
</VirtualHost>

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.