I have an EC2 instance with WHM installed and I'm trying to host a website on it. I can ping the EC2 just fine but attempting to ping the domain gets me "unknown host". As far as I can tell my DNS and vhost info is set up correctly.
Is there some common configuration step I'm missing to get a domain up and running on ec2?
You need to create 'A record' for DNS to bind domain to IP address. This can be done in route 53, there are various types of options please find here that suits you.
Related
I want to assign a domain name to an internal openstack floating ip, to access the instance over the internet.
I checked that you can set dnsmasq_dns_servers = 1.1.1.1 and configure dhcp_agent.ini accordingly, it seems to be a step in the right direction, but i couldn't find a way to allocate domain name to openstack instance (via horizon or cli).
The dnsmasq server that is managed by the DHCP agent is used to implement DHCP in subnets where DHCP is enabled. It does not resolve hostnames. If you want to be able to resolve hostnames internally, you could look into running a DNS server in your subnet or maintaning a hostfile on each instance that needs to communicate with the instance.
You could look at Designate. That is the DNS as a Service component of OpenStack. It is also possible to integrate Designate with an external service to manage external DNS.
See SysEleven's How to set up DNS for a Server/Website.
It walks you through the process of:
Creating the zone,
adding the DNS record, and finally
making the zone authoritative in global DNS.
It assumes you can use the OpenStack CLI, but there's also documentation on doing the same thing with Terraform, which I'd recommend as it fully automates the entire infrastructure with infrastructure as code (IaC).
It should apply to any OpenStack provider.
So I have two domains:
http://firstexample.com
http://secondexample.com
on my router I currently have portforwarding so that when someone goes to http://firstexample.com, they see the website that my computer with internal IP 192.168.0.15 is hosting
How can I set it up so that if someone goes to http://secondexample.com, they would see the website that my other computer, with internal ip 192.168.0.16 is hosting?
Both of my computers have the same public IP.
Is it a setting on my router I would change? Or would godaddy allow me to configure something?
No it is not possible to listen for two domains on the same IP/port configuration, using just Layer3/4 functionality alone. Most of the web servers do it based on the Host field in the request. If you are okay with using two ports on your router, that's possible eg. you can do something like following port forwarding
<router_ip>:80 -> 192.168.0.15:80
<router_ip>:8080 -> 192.168.0.16:80
But the problem with that is anyone trying to access http://secondexample.com should always access it as http://secondexample.com:8080 which is very inconvenient.
Here's another alternative you can do -
run a webserver on say 192.168.0.15 like nginx or something and create two backends one for each http://firstexample.com and http://secondexample.com . Refer nginx docs for how to do it. You'd not need three machines for that firstexample.com can run on 192.168.0.15 (except not on a standard port 80 but on a port 8080 say) and secondexample.com would run on another machine. And then add only following entry on your router port forwarding
<router_ip>:80 -> 192.168.0.15:80 # assuming ngninx is listening on port 80.
I am assuming both firstexample.com and secondexample.com do resolve to your router IP address.
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.
There is a website hosted on a server on our network, and I'm trying to find where exactly this has been installed.
Using the IP is there anyway that I can resolve this to a machine name on our network? I've tried pining the IP but don't get anything useful back.
This will return the machine/computer name:
PING -a xxx-xxx-xxx-xxx
I am using dnsmasq to handle wildcard subdomains.
on my local machine, I have installed dnsmasq and added address=dev/127.0.0.1 in /etc/dnsmasq.conf file. It works fine on local after restarting the dnsmasq.
Now i am planning to make the code live on amazon ec2 instance with registered domain. I am unable to configure the dnsmasq there.
Can anyone help me?
I am using ngix.
No need to run dnsmasq on your EC2 instance.
Just configure your registered domain to use some DNS nameserver (usually, something like ns1.example.com, ns2.example.com). Then, on your DNS nameserver provider, you can usually configure out DNS records using some kind of web-based control panel. It's there where you create your DNS records and point them to your EC2 instance IP address.
In other words, I don't think you need to run dnsmasq in your EC2 instance, unless I'm getting your question wrong.