Question

Only able to set up site as root?

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?


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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/example.com/public_html. 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.

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?