I am very to new web development and I am simply trying to put up a web page that just says “Hello, world”. I would like to build a portfolio page to post the work that I’ve done in my programming classes but am unsure as to what I need to do have my simple webpage show up. I feel like I am missing a step or series of steps and maybe I just don’t understand everything that is required but this is what I have done (successfully…I believe) thus far:
I don’t know what the next steps are. I have uploaded an html file but that’s where I feel like I am missing something. After I’ve uploaded it, is that it? Is there something significant that I am missing?
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 tried to edit the root line using nano
after editing
i clicked ctrl-x and inputted Y
i got this
**[ Error writing /etc/nginx/sites-available/default: Permission denied ] ** please i need help urgently
This comment has been deleted
Hi @coolinmc6
You’re definitely on the right track! After setting up the DNS records so that your domain points to your Droplet’s IP address, and securing the Droplet (initial server setup), all you need to do is install a webserver and upload the files that it should serve.
The most popular webservers are Apache and Nginx. Nginx performs much better than Apache at serving static files, so I would recommend going with that. Take a look at this tutorial:
Once you’ve followed it and installed Nginx, you’ll want to configure it to use a new path for the files. While you can use almost any path you want, I personally prefer /srv/www. Create that directory, and another directory in it for your domain name in order to make it easier to add other websites with different domain names in the future:
sudo mkdir /srv/www /srv/www/colinmc.me
Then, configure nginx to serve files from that directory. Open /etc/nginx/sites-available/default in your favorite text editor and update the line with the root directive such that it looks as follows:
root /srv/www/colinmc.me;
Restart nginx in order for the changes to take effect:
sudo service nginx restart
Finally, change the directory ownership to your own user so that you can write to it:
sudo chown -R user:user /srv/www
And you’re done! You can now upload your website’s files using FileZilla to /srv/www/colinmc.me, which you should then see at colinmc.me.
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.