Nginx Different Domains on Same IP

Your “listen” directives are wrong. See this page: http://nginx.org/en/docs/http/server_names.html. They should be server { listen 80; server_name www.domain1.example; root /var/www/domain1; } server { listen 80; server_name www.domain2.example; root /var/www/domain2; } Note, I have only included the relevant lines. Everything else looked okay but I just deleted it for clarity. To test it you might want … Read more

jquery, domain, get URL

You don’t need jQuery for this, as simple javascript will suffice: alert(document.domain); See it in action: console.log(“Output;”); console.log(location.hostname); console.log(document.domain); alert(window.location.hostname) console.log(“document.URL : “+document.URL); console.log(“document.location.href : “+document.location.href); console.log(“document.location.origin : “+document.location.origin); console.log(“document.location.hostname : “+document.location.hostname); console.log(“document.location.host : “+document.location.host); console.log(“document.location.pathname : “+document.location.pathname); For further domain-related values, check out the properties of window.location online. You may find that location.host is … Read more

RRSet of type CNAME with DNS name foo.com. is not permitted at apex in zone bar.com

As per RFC1912 section 2.4: A CNAME record is not allowed to coexist with any other data. In other words, if suzy.podunk.xx is an alias for sue.podunk.xx, you can’t also have an MX record for suzy.podunk.edu, or an A record, or even a TXT record. Especially do not try to combine CNAMEs and NS records … Read more

What is the difference between 127.0.0.1 and localhost

Well, the most likely difference is that you still have to do an actual lookup of localhost somewhere. If you use 127.0.0.1, then (intelligent) software will just turn that directly into an IP address and use it. Some implementations of gethostbyname will detect the dotted format (and presumably the equivalent IPv6 format) and not do … Read more

How can I list ALL DNS records? [closed]

The short answer is that it’s usually not possible, unless you control the domain. Option 1: ANY query When you query for ANY, you will get a list of all records at that level but not below. # try this dig google.com any This may return A records, TXT records, NS records, MX records, etc … Read more