Error Cannot Resolve Hostname Apache
Contents |
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you cannot resolve hostname teamspeak 3 might have Meta Discuss the workings and policies of this site
Cannot Resolve Hostname Raspberry Pi
About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting cannot resolve hostname over vpn ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join
Cannot Resolve Hostname Remote Desktop
them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Apache - server not resolving by /etc/hosts if I have not internet connection up vote 3 down vote favorite 1 I have configured many virtualhosts cannot resolve hostname linux in my current apache2 server, in my local machine (Ubuntu 13.10). Those are different local sites, with domains which are set in my /etc/hosts: 127.0.0.1 localhost 127.0.0.1 agroplasticos.dev 127.0.0.1 resources.dev 127.0.1.1 luismasuelli-inspiron14 # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters Where the agroplasticos.dev and resources.dev sites were created by me, and the previous settings were set by default. For localhost, agroplasticos.dev, and resources.dev, I have site entries in /etc/apache2/sites-enabled directory (only those 3 entries exist in this directory), which are links to the corresponding files in /etc/apache2/sites-available: agroplasticos.dev looks like:
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about
Cannot Resolve Hostname Minecraft Fix
Stack Overflow the company Business Learn more about hiring developers or posting ads
Cannot Resolve Hostname Mac
with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow cannot resolve hostname windows 7 is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ** server can't find hostname.com nxdomain up vote 3 down vote favorite I http://askubuntu.com/questions/500472/apache-server-not-resolving-by-etc-hosts-if-i-have-not-internet-connection am trying to set up an apache web server on my vm and im running into some issues. When I do an 'nslookup' on the hostname of the machine this is what I get: nslookup rhel64.xxxxx.xxxxx.com Server: xxx.xxx.32.1 Address: xxx.xxx.32.1#53 ** server can't find rhel64.xxxxx.xxxxx.com: NXDOMAIN I'm sure this is a common problem but I'm not sure how to fix it. It seems that dnsmasq can't resolve the hostname. Adding http://stackoverflow.com/questions/17882119/server-cant-find-hostname-com-nxdomain the hostname to /etc/hosts doesn't fix it. Running on an RHEL6.4 machine. Thanks in advance. apache hosts nslookup dnsmasq share|improve this question edited Jul 26 '13 at 14:23 asked Jul 26 '13 at 13:06 PT_C 4851424 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote You should use a DNS server that is able to resolve the name; the one you are using now, at xxx.xxx.32.1, isn't. Adding the hostname to /etc/hosts doesn't fix it. This is because nslookup does a DNS lookup always, it does not read the hosts file. Try using getent instead, for example I get: $ getent hosts rhel64.xxxxx.xxxxx.com 176.74.176.178 rhel64.xxxxx.xxxxx.com (By the way, you should use example.com as an example almost always, so you don't inadvertently link to adult-only websites) share|improve this answer answered Jul 26 '13 at 13:16 Joni 63.6k872119 Are you the sysadmin for the DNS server? getent hosts looks up names from the different services available to the system in the order specified in /etc/nsswitch.conf, make sure the line for "hosts" says "files" before "dns" –Joni Jul 26 '13 at 13:27 Is there a way to add the name to a dns conf file so where it CAN resolve it?
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site http://stackoverflow.com/questions/23851452/cant-resolve-domain-names-in-php-under-apache About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join http://www.centos.org/forums/viewtopic.php?t=8093 the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Can't resolve domain names cannot resolve in php under apache up vote 1 down vote favorite 1 I'm at my wits end with this one. I have apache running on a server of mine (an Amazon ec2 instance), and I can't seem to resolve domain names in php. For example fopen('http://www.google.com', 'r') will throw "php_network_getaddresses: getaddrinfo failed: Name or service not known", but if I change the url to one of google's cannot resolve hostname ip addresses it will work fine. Pinging www.google.com on the remote server works fine as well so I know its not a problem with the "outer system." The peculiar thing is that I've had this server up and running for a while without any issues and I can't think of anything I did that could have caused this. In my php.ini I have allow_url_fopen = On and to make sure it was being applied I ran phpinfo() from the same script that is having this problem and allow_url_fopen is in fact turned on. Any ideas of what else I should try? Could some sort of file permissions problem be causing this? Because I did change some file permissions inside my webapp, and I suppose its possible I mistyped something and accidentally changed permissions/owenership of some files outside of the app. Its highly unlikely but I can't think of anything else I did on the system that could have stopped this from working. Thanks. php linux apache dns share|improve this question edited May 25 '14 at 19:25 asked May 25 '14 at 2:26 user1585789 413411 If I run the php script from the
resolve *any* hostnames. Issues related to configuring your network Post Reply Print view Search Advanced search 7 posts • Page 1 of 1 MWade Posts: 5 Joined: 2012/06/16 21:44:08 Contact: Contact MWade Website [SOLVED] Can't resolve *any* hostnames. Quote Postby MWade » 2012/06/16 21:49:05 Hello,Recently I have been having a problem with what I'm guessing is my DNS configuration.I have a CentOS server running whm/cpanel and have not had this problem before.when I try to ping google.com I get this from tcpdump:15:58:03.154267 IP 46.249.48.97.53536 > 8.8.8.8.domain: 10474+ A? google.com. (28)resolv.conf:search 2006scape.comnameserver 8.8.8.8nameserver 8.8.4.4/etc/hosts:127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain646.249.48.97 server.2006scape.com serverroute -n:Kernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface46.249.48.0 0.0.0.0 255.255.255.0 U 0 0 0 em10.0.0.0 46.249.48.1 0.0.0.0 UG 0 0 0 em1I can ping all IP addresses fine. I can ping hostname.domain.com.I am unable to use dig or any other commands like nslookup (they all say failed to connect)Anything that requires resolve an domain name (updating csf firewall, and so on), fails to do anything. Top TrevorH Forum Moderator Posts: 16773 Joined: 2009/09/24 10:40:56 Location: Brighton, UK Re: Can't resolve *any* hostnames. Quote Postby TrevorH » 2012/06/16 22:12:16 Sounds like you have either lost external connectivity (missing route?) or you've firewalled off either outbound or inbound UDP port 53 traffic. Can you ping 8.8.8.8? If you can then the connectivity is OK but your DNS lookups are failing and these are done using UDP port 53 (and the same port on TCP for longer responses). Check your firewall rules. Top MWade Posts: 5 Joined: 2012/06/16 21:44:08 Contact: Contact MWade Website Re: Can't resolve *any* hostnames. Quote Postby MWade » 2012/06/16 23:31:17 I can ping 8.8.8.8 as well a