By anthonysilva
I’ve setup an ubuntu server with LEMP and phpmyadmin and I’ve managed to setup an nginx vhost using your tutorial. However, I couldn’t see my vhost site until I added an entry on the DNS setup page. Now I see a site, but it’s the index.html file in my default web root, not my new vhost web root. But, there’s nowhere to specify the web root on the DNS setup page, so how do I let DNS know about the site, but then make sure requests go to the right web root on my server?
I’m new to this stuff, but I have to say the tutorials and interface (other than this issue I’m confused on) are great and I’m having fun learning!
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!
DNS is purely used to map domains and subdomains to the IP of the server. <br> <br>Which files are served from which directory on the server based on the domain you specified is all handled by your web server, in this case nginx. <br> <br>The issue you mentioned either indicates that there is an issue with your nginx config, or if everything is correct that you may not have restarted it after making modifications. Anytime you change the nginx config you need to restart the service. <br> <br>If you paste your nginx config for the domain in question we can see if there are any possible errors in it. <br>
I got it working. I was having issues with a server block that didn’t have the ‘www’ part in it. Live and learn. ;) <br> <br>So, do I need to create an entry on the DNS page for each domain/subdomain that I add to my server before it’ll be browsable?
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.