HomeНаука и техникаRelated VideosMore From: Macgyver

How to Install Nginx and Setup a Website on a Digital Ocean Droplet

82 ratings | 8970 views
In this video I walk you through spinning up an Ubuntu digital ocean droplet, installing and running NGINX web server software. And then explaining how to use NGINX to serve up static files - which is the basis of a basic web server. Full Blog Post: https://askmacgyver.com/blog/tutorials/how-to-install-nginx-and-setup-a-website-on-a-digital-ocean-droplet
Html code for embedding videos on your blog
Text Comments (21)
Ian Beckett (1 month ago)
5:22 I get the welcome html on my terminal (PuTTy) but when I try to open the website in chrome, i get (IP address) took too long to respond. my files are like 300kb. Maybe there's something wrong with my DNS mapping?
Macgyver (1 month ago)
Ian Beckett (1 month ago)
I figured it out. It was the ubuntu firewall. Thanks. I'm doing SSH though.
Growth Value (1 month ago)
Probably being blocked at the firewall (ip tables). Putty (telnet) runs a different port than a browser http/https. Try disabling the firewall via ubuntu or whichever OS your droplet is on.
Ecommerce Monopoly (3 months ago)
Thank you! I have a project with typescript and nodejs, y have cloned to the digitalocean server via git, do you know now that my nginx web server is working, how can I push my projet? Thank you for your time!
Macgyver (1 month ago)
I would need more info!
Jack Mister (3 months ago)
All steps shown and, frankly, there was no need to say more. Thanks!
Macgyver (1 month ago)
Great thanks
Felipe Edoardo (8 months ago)
You seem to have a fairly basic understanding of what you're teaching.
Macgyver (8 months ago)
Alex Winkler (11 months ago)
curl localhost works for me but at @5:25 when you load the site via IP in browser I get "This site can’t be reached" any ideas?
Macgyver (10 months ago)
Let's discuss in the slack channel - https://slack.askmacgyver.com/
Alex Winkler (11 months ago)
Fixed. My nginx/sites-enabled/default folder was missing: root /usr/share/nginx/html; index index.html index.htm; New problem, changed nginx html but it didn't update in browser (even after clearing cash).
The Misery (1 year ago)
do you know how you use nginx fastcgi? how to install naxsi in it and configure?
RileyDatLord (1 year ago)
"E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?"
Macgyver (1 year ago)
After what command did you see this message?
Stephanie Vizzi (1 year ago)
Great start, thanks! Question: going one step further, I have a folder with my site files (html, css, images etc.) that I want to put on there, how do I get that whole folder up? Just add it to /usr/share/nginx/html?
Macgyver (1 year ago)
+Stephanie Vizzi Exactly, if you check your site-enabled file it will show you the path to the root file server directory. You could change the referenced path in the site-enabled file then reload and restart nginx. Or you could just move your files to the already referenced directory.
dev_ bpn (1 year ago)
Nice tutorial Thanks.
DynoStorm (1 year ago)
Macgyver (1 year ago)
No problem! Let us know if there are any other topics you want us to cover.

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.