i have two magento 2 instances in my virtualbox ubuntu server.
1st one is new installation magento2.3 located at
/var/www/html/
, it is working find and accessible from browser using ip 127.0.0.1
or localhost
The 2nd instance is cloned version of production site magento 2.2.9, located at /var/www/html2/
. I’m able to run bin/magento commands
from the command line, however i’m not able to access the site from browser.
How do i modify the configuration file for hosts at /etc/apache2/sites-available/
to work with multiple magento sites?
/etc/apache2/sites-available/newsite.conf
ServerAdmin webmaster@admin.com
ServerName localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
/etc/apache2/sites-available/newsite2.conf
ServerAdmin webmaster@admin.com
ServerName localhost2
DocumentRoot /var/www/html2
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
/etc/hosts
127.0.0.1 localhost
127.0.0.1 localhost2