I have a Nginx server on my own server. I have a DDNS from asuscomm.com e.g. mydomain.asuscomm.com. Now I want to be able to handle to different sites using CNAME and Nginx.
www.domain1.com and www.domain2.com. In my DNS I want both to point to mydomain.asuscomm.com, and then depending on if it is www.domain1.com or www.domain2.com I want to show different sites.
Is it possible to do with CNAME and Nginx, or do I have to have an A pointer for this?
Thanks in advance.
CNAME is pointer to domain, and A is pointer to IP, you need to define A for IP (Nginx port 80).
You can try subdomain for nginx
Related
I have installed nginx load balancer on two server . I want to assign one same DNS for both IP of server!
So that I can use assign DNS for hitting request which will route request on both nginx server simultaneously!!
Thanks on advance !!
I wanted do it virtually...not through fqdn.
I have installed nginx load balancer on two server . I want to assign one same DNS for both IP of server! So that I can use assign DNS for hitting request which will route request on both nginx server simultaneously!! Thanks on advance !! I wanted do it virtually...not through fqdn.
Follow the normal procedure to assign a single IP address to a DNS name.
Repeat once, for the other IP address.
Good luck!
I have just one IP address for my server. It has two websites
123.456.789.11/~user1
123.456.789.11/~user2
Can I have two domains pointing to each user separately?
www.domainabc.com --> 123.456.789.11/~user1
www.domainxyz.com --> 123.456.789.11/~user2
I do not wish to append any thing to either of the domain names [ www.domainabc.com/~bigNO ]
Is it possible?
Thanks!
DNS is only concerned with mapping names to IP addresses. It knows nothing about protoocols, or anything else outside of the name www.example.com or the address 123.45.67.89
Most, if not all, web servers understand the concept of a virtual host, so you could configure user1.example.com to be a specific virtual host that then redirects to www.example.com/user1
We have Namebright domain name as dattus.com, we want to create a subdomain as test.dattus.com and redirect all it's traffic to amazon ec2 instance's elastic IP address.
Is this possible? How to do this?
PS: Existing website deployed on namebright should work as it is which is dattus.com.
Yes, possible and easy.
In your DNS provider(which maybe route53 or anyone else) setup a new 'A' record that points test.dattus.com to your elastic ip address.
I wonder if is it ok to host multiple sites on a server with one IP address?
I bought server on hetzner and I want to host 10 different websites of my clients. Eg. client1.com, client2.net, client3.org etc. I changed "A record" in all domains on IP address of my server. Is there any reasons to not do that? Or maybe I should buy additional IP address for each site?
Thank You.
Sure it is, your webserver will be able to filter requests to the correct site based on the incoming request's URL.
In Apache this is done by adding a new virtual host to your configuration.
I would like to know. When a domain example.com has an IP address: 41.72.111.222, would any of its subdomains (sub.example.com, mail.example.com etc) have the same IP address listed in the DNS records? Or does it work like this: A request is sent from the browser to the DNS server for sub.example.com. The DNS server returns the IP address for example.com, and the split/differentiation is made when the request for sub.example.com hits the example.com host server? So the host server basically know what to do with sub.example.com and not the DNS server?
It can kind of be a combination of both. Ultimately, though, the decisions are made based on what you set your DNS settings to be. Your host (or hosts) will then get whatever traffic you determined they should get in your DNS settings.
So for example...
You can set your DNS settings to take [anything].example.com and always direct that to your server. You would do this by adding a wildcard entry to your DNS subdomains. Wildcard entries use a * symbol to mean "anything". You would then need to configure your server to know what to do with all these different potential subdomains it could be receiving.
At the same time, you can set specific subdomains to go to other hosts. For example, if you wanted mail.example.com to go to some other webmail host, you would set up in your DNS the subdomain "mail" and have that traffic redirected to wherever you were hosting your webmail.