I don't know which steps you already performed, but in theory it should be quite simple. Something like:
1. Become root and go to where the .conf files are:
Code:
sudo -i cd /etc/apache2/sites-available
Code:
cp 000-default.conf domain2.conf
3. Edit the basic parameters you need to change with the domain info and the path where you will keep the files of the second site:
Code:
nano domain2.conf (modify it like:) ServerName domain2.com ServerAlias www.domain2.com DocumentRoot /var/www/domain2
Code:
a2ensite domain2.conf service apache2 restart
But you also need actions in the DNS servers handling your domain(s). You need to create the A records pointing to the public IP of your webserver VM (in case you already haven't created these records). Of course, the DNS is what points clients to your server, it's not enough just to create the config files on the server.
برچسب:
نویسنده: استخدام کار