Apache uses virtual host in Ubuntu to run more than one website on a single server with a single public IP address. You can secure and manage multiple websites on the same server by creating the appropriate permissions and ownerships in the directory structure.
Create Virtual Host for (http://local.membership.acs.com)
#sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/local.membership.acs.com.conf
#sudo gedit /etc/apache2/sites-available/local.membership.acs.com .conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<VirtualHost *:80> ServerAdmin magento2@test.com ServerName local.membership.acs.com ServerAlias www.local.membership.acs.com DocumentRoot /var/www/html/acs ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /var/www/html/acs> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost> |
#sudo a2ensite local.membership.acs.com.conf
#sudo service apache2 restart
#sudo gedit /etc/hosts
Add:
127.0.0.1 local.membership.acs.com
Now run this domain is created:
http://local.membership.acs.com/
bluethinkinc_blog
2022-08-25