By matej625377
When I set up a droplet I was “lazy” with naming. Now my hostname is “First.com”. And there are two websites on the server (NGINX).
I want to change hostname from “First.com” to Production. But I am slightly lost since two FQDN are pointing to the same machine.
Should I do as following:
change in /etc/hostname to Production (as from now it was First.com) (* this one for me is logical *)
change in /etc/hosts: 127.0.1.1 SITEA.COM 127.0.1.1 SITEB.COM (now it was 127.0.1.1 First.com)
I am especially lost by this 127.0.1.1 loop-back.
Or should I do: (real-ip) SITEA.COM (real-ip) SITEB.COM
Or should I just 127.0.1.1 Production
Matej
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!
If u said your server in nginx web server. Its better you set your domain to DO nameserver and pointing domain to A - “ip address” and setup your nginx config with different domain.
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.