hey. when i first start with a clean ubuntu image, I have no www folder. where shall i create it? i saw some put it in var/www and others in root/www. does it matters? i use cloud 9 for coding and it points only to the root dir…
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!
I hate using the mainstream /var/www/html/<domain>/public/<contents>, it’s just too long in my opinion.
I use /web/<domain>/<subdomain>/public/<contents>, the directives are set up in nginx and it works fine. Just make sure www-data has access to the directory, /root or specific home folders probably won’t be a great idea. Saying that, don’t put it in /bin /etc or any of the other binary/config folders, they’re there for a purpose.
and do you manage to have different websites installed? for example, when i try to put also codiad there: var/www/codiad - i cant get it to work
It doesn’t really matter, as long as you configure the directives in the right way.
I use /var/www on all my websites for many years, without any problem! ( which is quite default ) If you prefer a more secure location, you could use something similar like /srv/www-data.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.