Is it somehow possible to edit /etc/hosts on Heroku , through the buildpack or otherwise?
I have a couple of dev sites that I need to connect to that don't have DNS entries, so I need to add a couple entries to /etc/hosts.
Thanks
I am pretty sure that's not possible. However, why can't you just specify the IP of whatever host you're trying to connect to, instead of specifying a host name? Also, if you absolutely must, I suppose you could create entries in a DNS server of a domain of your own (say: mydomain.com), and then specify myhost.mydomain.com.
Related
I have developed an app and make it available via Heroku. Now I would like to add a custom domain name via Ionos however I don't know how to configure it. When using EC2 instances I would configure an static ip address but for Heroku, I don't know what to do. I have checked other post about this but none a precise or recent about what to do.
Thanks for you attention and have a Great day.
Had the exact same issue and here's how I made it work (just specifying I'm not an expert, so take this answer with a grain of salt):
First you'd have to go to Heroku in your app setting and then add the domain name you bought. It's important that you write the host when adding it, like put either www. or *. at the beginning of the domain. It will give you back a DNS target which you will then need to use on Ionos.
Secondly, you'd have to bind this DNS target on Ionos using a CNAME. Just go to your domains, click the one in your list, then open DNS and click Add a record. Choose CNAME and then put www as provider and past the DNS target you copied in target field. Finally, confirm the changes
Wait a few seconds/minutes, navigate to www.yourdomain.whatever and tada!
About static IP address, Heroku made some docs, and that won't work, you'd have to use dynamic ones. So in a nutshell, use CNAMEs instead of A records
Here are some docs if you want to dig more into this
Thanks in advance.
I have setup a server in which I intend to host a couple of applications but something weird is happening, I have bought a couple of domains which I have all mapped to the same ip address, but now when trying to ssh to that server only one of the domains goes through, the rest don't.
Someone please explain why this is happening and what I could have probably done wrong
Am I correct that you are attempting to connect to the different domains via different saved configurations in your SSH terminal app. If so, check that you have connected each of those configurations to the appropriate private key. And of course check any other settings you may have needed in those configurations.
For example, make sure that if the host name for the working one is <username>#<domainOne> then the others are not simply <domainTwo.com>. (Errors like this can be hidden in some SSH terminals if the domain is very long.)
I have looked this up and what was described in other answers did not work for me. I created a elastic ip from my ec-2 dashboard, and I set the A records of my domain (www, *, and #(none)) but it does not work. When I try to go directly to the ip address it also does not work though so I am not sure why this is happening.
Also where exactly does the elastic ip point? To my home folder, to the ec-2 user? It is not working now so I couldn't test it, but when it does work I still won't know.
Two things: remember that your domain will need to propagate, so leave it a few hours. Also, your elastic IP points to the machine you bound it to.
Almost forgot, you also need to edit your security zone to open up ports to allow incoming connections on those ports, as the default is to block everything except SSH.
One of my sites - mediadeals.co.uk is showing a blank page.
So I went back to my developer. He asked me to add this on my hosts file
in windows->system32->drivers->etc->hosts
74.86.205.232 mediadeals.co.uk
After doing this the site started working. What does this mean?
Thats crazy. All he did was make it work on YOUR machine. The hosts file simply maps names to IP addresses. Its like a local DNS. What needs to happen for the outside world to see this the DNS servers that are authoritative for mediadeals.co.uk need to have an A record pointing to 74.86.205.232.
How long ago did you register that site name? Don't forget that DNS entries may take a while to propagate across the web. 24 hrs+ sometimes.
And btw, that "fix" will ONLY work on your machine. It maps the friendly URL to an IP address for you, not for the world.
The reason its not working is there is no DNS record for it.
The hosts file is allowing you to point via a local DNS replacement.
All you need is to get the site hosted somewhere and a DNS entry setup.
If you like the site and he is willing to host for $150 then go for it, depending on your contract, if he should have done in the initial budget then you should question this.
RE
I just want to add a couple subdomains to my computers FQDN so that I can have some Vitrual Servers (apache.)
Any ideas?
Note: I need to add the aliases to my machine, like a.foo.com and b.foo.com. I don't think apache makes those aliases.
Alternative: I decided that instead of trying to add stuff to my domain name (since then I'd have to edit the dns server) I would configure virtual hosts for a separate port. That way it's all up to my computer. Thanks for the help nonetheless!
If this is on a Windows domain: go into the DNS management tool on the DC, and add host entries (CN records, not A records) pointing the desired names to the original computer name.
If you're doing this all on one (non-server) box: edit the hosts file, and point the names to the right IP address.