Only able to set up site as root?

February 23, 2014 1.3k views
Ok now I admit I don't have the absolute simplest configuration, I want my main domain name (my own) to be a drupal site and then set up a virtual host for another site (my client's) that is not drupal based. This is working right now as it is supposed to. Only one problem, after numerous, numerous attempts the only time I can make this work is if I ignore the instructions to make a sudo user and do everything as root, leaving a very unsecured site. I have tried probably 10 times as the sudo user and failed every time but tried twice as root and its worked both times. So what about the initial droplet server tutorial that takes away your ability to create sites?
2 Answers
Just to clarify your are trying to add a user with sudo privileges to separate the 2 sites? Also when you say "its not working" what is "it" or to be more precise what is this user you have created not doing for you? Lastly just to cover the bases, did you and the user you created to the sudors file and to the www-data group?
Fair enough sorry, I will try to clarify all your points, I really appreciate you taking the time to tell me what I was doing wrong. I wil try to answer all your questions but please forgive my noob-ness if it shows through. I am trying to add a sudo user because the tutorials suggest it as a security measure and say to do all the set up work through the sudo user not the actual root again for security reasons. What is working right now (because I used the root user to set it up) is my two site configuration, one main site in the /var/www/ folder (which is my drupal site) and one in /var/www/ It is the achieving of this set up that I seem unable to do as a sudo user, things like uploading via SFTP don't work as the sudo user and I am unable (even though I believe I am doing the tutorials exactly correctly) to achieve any sort of working config when using the sudo user, the closest I get is that I can have one site enabled at a time, the main or the virtual host, and whichever one I enable becomes the only working site at both domain names. It still sounds confusing I think. I am sorry I don't know how to explain myself better, its ok my sites are working now so lets just pray that keeps up lol. Thanks again.
Have another answer? Share your knowledge.