Adding second site to a droplet

  • Posted April 24, 2014

So i have a live working site on my droplet, but its a small project with little traffic. I wanted to go ahead and add another project on there and route it using a different domain name. I have as (as far as I can tell) pushed the projects repository to the server and set up the DNS forwarding; but for whatever reason my first site is up and working ( and my second site ( shows nothing when i go to it. Hoping for any help trouble shooting this problem; also whenever I do an ls -la inside my server from the command line I cannot find either projects directory on the server this is all i get:

root@Vindit:~# ls -la total 44 drwx------ 7 root root 4096 Apr 24 19:47 . drwxr-xr-x 22 root root 4096 Apr 18 20:38 … drwxr-xr-x 3 root root 4096 Apr 18 20:36 .ansible drwx------ 2 root root 4096 Apr 23 22:03 .aptitude -rw------- 1 root root 1338 Apr 24 20:00 .bash_history -rw-r–r-- 1 root root 3106 Oct 28 2012 .bashrc drwx------ 2 root root 4096 Oct 18 2013 .cache drwxr-xr-x 3 root root 4096 Apr 18 21:47 .composer -rw-r–r-- 1 root root 0 Apr 9 19:50 .mysql_history -rw-r–r-- 1 root root 140 Oct 28 2012 .profile drwx------ 2 root root 4096 Apr 18 19:16 .ssh -rw------- 1 root root 1732 Apr 24 19:47 .viminfo

any help is appreicated.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

We’d need some more specifics about what your current set up is to help you? Do you know what web server you are using (nginx, apache, etc…)? Are these static sites, or are you using a content management system of some kind (e.g. Wordpress)? <br> <br>If you’re using Apache, this tutorial show put you on the right path: <br> <br> <br> <br>Let us know how it goes!

I could be wrong having never tried it, but add the second domain to your severs IP (either via your domain registers panel or DO’s DNS panel; however you have your domain set up).
<br> <br>then go to your /etc/host file and add the domain as you would any other domain <br> <br>Create the directory and add your site files, then <br># chown -R www-data:wwwdata /path/to/your/site/dir <br>(www-data is the user and group for apache) <br> <br>then you just create the vhost file, in Ubuntu it would be located in: <br>/etc/apache2/sites-available/
<br>//Please note the version of apache you are using as it will effect how you set that file up. Simplest way to find out is googling your distro version setup apache vhost. Each distro is different. Also note that different sites (such as drupal vs wordpress) may have different configurations for the vhost.