Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi All,
I currently have two domains pointing to my digital ocean LAMP Server. I have a directory for each domain in the /var/www directory. /var/www/domain1 and /var/www/domain2. I also kept the /var/www/html directory as default.
I have created a .config file for each directory in /etc/apache2/sites-available/ domain1.config and domain2.config. See below:
<VirtualHost * :80>
ServerName domain1
ServerAlias www.domain1
ServerAdmin webmaster@localhost
DocumentRoot/var/www/domain1
Errorlog $(APACHE LOG DIR}/error.log
Customlog $(APACHE LOG DIR}/access.log combined
</VirtualHost>
<VirtualHost * :80>
ServerName domain2
ServerAlias www.domain2
ServerAdmin webmaster@localhost
DocumentRoot/var/www/domain2
Errorlog $(APACHE LOG DIR}/error.log
Customlog $(APACHE LOG DIR}/access.log combined
</VirtualHost>
I then enable both virtual hosts with:
sudo a2ensite domain1
sudo a2ensite domain2
sudo systemctl reload apache2
when I type in my browser www.domain1.com the correct website is served. However, if I type www.domain2.com the domain1 website is served.
The only way I can get www.domain2.com website to run is by turning off the first virtual host
sudo a2dissite domain1
sudo systemctl reload apache2
Now if I type www.domain2.com the correct website is displayed.
What can I do to enable both sites?
ISMA
HidingTealCrab
431466ed13c743eea4465ba4976709
Glenna Ladner
Kendall Roy
Rebecca Simons
zetroot
8f2f0207cb584a02962f69522e1d47
TurboLaser