Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Feb 2010
Apache unable to access external resources - no route to host
First of all I have attached a picture which generally explains what is the problem. Namely, I am running Apache on CentOS 5.4 which also serves as a gateway for a couple of computers in a local network. All is working fine and the computers inside the local network have access to internet and the web server.
The issue is that on the web server there are a couple of PHP applications (forums and some custom made) that require Apache to fetch some pages from the external resources i.e. web pages etc. but when that happens Apache is simply not able to fetch them. It throws a message like this
Warning: file_get_contents(http : // somedomain DOT com) [function.file-get-contents]: failed to open stream: No route to host in /home/theta5/public_html/fetchl.php on line 11
After that I thought that perhaps apache user somehow didn't have access to that environmental variable so I granted it a full login account (switched from /sbin/nologin to /bin/bash) and checked to see if it can access the variable (env | grep proxy) and it was there but Apache still refuses to fetch external pages. Oh yes...Somehow if I try to fetch the web page that lies on the web server itself (I use the physical address of the server) Apache is able to fetch it Now who is dumb here?
I tried everything I could think of, I literally crawled hundreds of pages for a solution and I can't seem to find one. By narrowing the possible causes I have found out that Apache is simply unable to resolve the address before it actually sends a request.
Once again I am thankful for any kind of suggestion since this is really really going to send me into retirement if I don't fix it soon