# DNS lookup failure



## myaytzu (Jul 9, 2010)

Hello,

We have a problem with our server that causes â€œCouldn't resolve host nameâ€ error . We are receiving the following error :




```
SimpleXMLElement::__construct() [simplexmlelement.--construct]: Couldn't resolve host name
```
If we try using the proxy setup in our server, we receive this error :

```
Bad Gateway!

The proxy server received an invalid response from an upstream server.

The proxy server could not handle the request GET  [url]http://example.org[/url]

Reason: DNS lookup failure for: [url]http://example.org[/url]
```

If we try to access sites via proxy by IP, it works

Does anybody have a solution for that ?

we are running :

```
Apache/2.2.15 (Unix) PHP/5.2.13 with Suhosin-Patch mod_ssl/2.2.15 OpenSSL/0.9.8m mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 Perl/v5.8.7
```


----------



## SirDice (Jul 9, 2010)

Make sure your /etc/resolv.conf contains proper DNS servers. See resolv.conf(5).


----------



## myaytzu (Jul 9, 2010)

My resolv.conf looks like :


```
search mydomain.com
nameserver 127.0.0.1
```

I'm using a VPS server , everyting works fine except proxy (DNS lookup failure) and rss parser.


----------



## SirDice (Jul 9, 2010)

Is there actually a DNS server running on localhost?


----------

