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.
Related
Is there a Windows (or Windows Device Driver) API that's equivalent to editing the etc/hosts file, i.e. to override or change the hostname-to-IPaddress mapping?
I'd want for a scenario where DNS might not exist on a LAN, or where the hosts in question aren't known to DNS, but where I know the host name and the IP addresses.
If not, then I take it that editing etc/hosts programmatically is the only way to do this?
How often or how soon does an edit to etc/hosts take effect -- i.e. if I edit it then will my next network connection request to a given host name use the new IP address, or is a stale value cached somewhere?
Windows has the file %WINDIR%\System32\drivers\etc\hosts which is exactly equivalent to the *nix /etc/hosts file.
I want to block DNS requests in my computer such as login.live.com, fs.windows.com, …, etc.
Basically, I'll change the settings
But I want to know How I add many URLs to the windows hosts file.
(I have many URLs to block, about 1000 URLs in text file)
The hosts file contains hostnames, not URLs.
Run Notepad As Administrator and edit C:\Windows\System32\Drivers\etc\hosts
Each line you add should be an IP address (e.g. a dummy one or 127.0.0.1 foor the loopback IP), followed by whitespace (space(s), tab(s)), followed by a hostname.
This will indeed prevent lookups in DNS for A records.
But are you sure this is how you want to do it?
There may be better methods, like using a filtering proxy for example.
I have to reach the wordpress platform installed by a certain hosting service, so I can build a new website (that will replace the old one), on a certain IP address. I changed my hosts file under their instructions. I put in it the IP address that they had given me and the website domain (separated by a single space). The hosts file hasn't any extension and it's in the right location (System32/drivers/etc - I'm on Windows 8). I cleaned browser and local DNS cache but nothing change: if I put in the browser the url they had given me (www.domain.com/?hostingname) I see the old website, not the wordpress platform. I tried to ping the domain and it returns a different IP address. What can I do? Thanks everyone in advance.
Ok, I solved. It's important to edit the hosts file with Windows Notepad and not with Notepad++
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.
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