By dzulfriday
I have a general question about nginx
Let say you don’t have a domain first, but you already fired up your droplets. You already success setup Nginx in your droplet.
But your plan is to host 2 website in the droplet So the first website is done, assuming the default nginx page is the first website.
Now, how can i host the second website? Remember for now i still dont have the domains. What to put in the nginx configuration (server_name) for the second website?
For the first website, i already use “server_name localhost;”
What sould i put for the second website?
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!
Just add some bogus domains to your ‘hosts’ file in the droplet. set up nginx using those. Then add them to your client machine ‘hosts’ file also. Now your bogus domains are available to you only and work in nginx.
Have you taken a look at this tutorial: <a href=“https://www.digitalocean.com/community/articles/how-to-set-up-nginx-virtual-hosts-server-blocks-on-ubuntu-12-04-lts--3”>How to Set Up nginx Virtual Hosts (Server Blocks) on Ubuntu 12.04 LTS</a>?
i did, but that tutorial assuming you already have a domain, or point to ip address. Its not answering my question here
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.