tbrueland
By:
tbrueland

I need to make a second site on the same Droplet

April 24, 2015 937 views
Apache WordPress Configuration Management

I have just made a Ubuntu/Wordpress site on a Droplet and I am very happy with it. But I want to use virtual hosts and connect a second site, but I am not sure if I have to destroy the first site I have there or if I can connect those two on same Droplet with configuring virtual hosts?

I have done some virtual hosts on both Windows and Linux before , and I am confident with the code etc.. but is there a way to do this without destroying all the hard work I have done with the first one?

I can give more info etc.. if needed

Or can I just make two directories inside www, and do the following config inside httpd.conf

<VirtualHost *:80>
DocumentRoot "/var/www/html/site1.com"
ServerName site1.com
ServerAlias www.site1.com
<Directory "/var/www/html/site1.com">
AllowOverride all
allow from all
Options +Indexes
</Directory>
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "/var/www/html/site2.com"
ServerName site2.com
ServerAlias www.site2.com
<Directory "/var/www/html/site2.com">
AllowOverride all
allow from all
Options +Indexes
</Directory>
</VirtualHost>

with the correct info of course

1 comment
  • I am doing a full backup through both wordpress export and through FTP, then I will make a new Droplet with the correct configurations

Be the first one to answer this question.