Hi. I am really new to all of this setting up the web stuff. How do I know which folder in DigitalOcean to put my index.html, css,js,img, etc stuff in? I found on many websites to put it in my var/www folder but I didn’t have a www file in my folder so after I created and put my stuff in there, it still doesn’t work and when I go on my website it says “nginx” stuff on it. Please help!
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!
Welcome to the wide world of web development! It sounds like you’re using Nginx as your web server. You need to open your Nginx configuration file, by default it’s named default, like so: <br> <br><pre> <br>sudo nano /etc/nginx/sites-enabled/default <br></pre> <br> <br>and find the setting for “root” You can either put your files in the folder defined there or change the setting to point to “/var/www/” If you change anything in that file, make sure to restart Nginx after with: <br> <br><pre> <br>sudo service nginx restart <br></pre>
How would I go about changing the setting to point to “/var/www/” or for any other directory for that matter?
@taeiscoolaboy: Just edit the file. It’s a plain text file, and when you restart Nginx it will pick up the changes.
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.