Cd/etc/apache2/sites-available
The recent virtual machine is not bound domain name, so, first use the domain name plus port to create a few sites with
1.
Vim/etc/apapche2/apapche2.conf
# Include List of ports to listen on
Include ports.conf
Find this, open this. Add listening port
Vim ports.conf
2. Add 8080 ports, or other ports you want
3, add the host configuration file, copy a previous configuration of your files, I used to match one, and then directly modify the good.
Cd/etc/apache2/sites-available
Vim Test.con
Just modify the directory of ports and DocumentRoot and other directories as well.
4, release the new site
sudo ln-s/etc/apache2/sites-available/test.conf/etc/apache2/sites-enabled/test.conf
The configuration files for the new site are created, and to make them effective they must also soft-link the profile to the Sites-enabled folder.
5. Restart Apache
Systemctl Restart Apache2
Restart the Apache server.
Open the browser access http://xxxx:8080 can access the correct, instructions on the configuration is a bit of crap, ha ha,, but to create in the root directory you re-config file documentroot path file,:)
Ubuntu Apache new multiple sites via port