Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a Debian box running Drupal behind a D-Link G604T Modem/Router which is configured to forward requests to the apache ports (80 and 443) on to the Drupal Server.
2 Issues:
1) Drupal complains that "HTTP Request Status Fails". I have noticed, from googling, that the modem does not allow 'loopbacks'. Could this be causing the issue?
2) My /etc/resolv.conf file is being overwritten presumably by the D-Link's DHCP. The overwritten file points to the D-Link as the nameserver, which is not resolving domain names.
Anyone got any experience of these?
I suspect the second issue will be a lot easier to solve.
I see you're based in Jossburg. I'm in Lanseria at the mo, but I'll be headed back to Durbs just as soon as I can...
Anyway, back on Topic...
The /var/log/apache2/access.log doesn't show much:
Code:
server:~# tail /var/log/apache2/access.log
41.26.128.214 - - [08/Dec/2009:11:49:33 +0200] "GET /inenergy/?q=admin/reports HTTP/1.1" 200 4356 "http://inenergy.org/inenergy/?q=admin/content/node/overview" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.33 Safari/532.0"
41.26.128.214 - - [08/Dec/2009:11:49:37 +0200] "GET /inenergy/sites/default/files/logo.jpg HTTP/1.1" 304 - "http://inenergy.org/inenergy/?q=admin/reports" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.33 Safari/532.0"
41.26.128.214 - - [08/Dec/2009:11:49:37 +0200] "GET /inenergy/sites/default/files/favicon.ico HTTP/1.1" 304 - "http://inenergy.org/inenergy/?q=admin/reports" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.33 Safari/532.0"
41.26.128.214 - - [08/Dec/2009:11:49:42 +0200] "GET /inenergy/?q=admin/reports/status HTTP/1.1" 200 5116 "http://inenergy.org/inenergy/?q=admin/reports" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.33 Safari/532.0"
This is the Drupal Error:
Code:
HTTP request status Fails
Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality. This could be due to your webserver configuration or PHP settings, and should be resolved in order to download information about available updates, fetch aggregator feeds, sign in via OpenID, or use other network-dependent services.
I think it's do do with a complicated security model by which Drupal puts out http calls via php which I have a feeling my router doesn't accept. (I could be wrong in this).
Cool, nice to chat to an SA mate, This seems to be a networking issue based on the name resolution.
Went you make the connection from outside, the D-Link does the correct thing, it forwards the packet to the drupal system on the inside, the system on the inside however trieds to make its own http connection to itself, (inenergy.org) this resolves to the external IP on the D-Link, the packet is sent out to the D-Link which then fails to send the packet back to the drupal host.
The work around is to create a mapping for inenergy.org to the internal ip address on the machine running drupal. You can use /etc/hosts for that.
Such that when drupal requests for inenergy.org it will resolve to itself.
No that should not affect it, from the logs you posted, a redirection is being made to inenergy.org. Maybe that is not what is generating the error, is there anything different in the logs ?
If you cannot see anything then maybe you can go low level to debug it by using tcpdump to see which requests are being made.
No that should not affect it, from the logs you posted, a redirection is being made to inenergy.org. Maybe that is not what is generating the error, is there anything different in the logs ?
If you cannot see anything then maybe you can go low level to debug it by using tcpdump to see which requests are being made.
Hi Topdog,
Sorry, I had a meeting I had to dash off to attend. And, as you know, in Jossburg you have to leave at least an hour in hand because the chances are good that several traffic lights are out between you and your destination.
Anyway, it appears that the 2 issues I had were interconnected.
The Router's DHCP had overwritten my /etc/resolv.conf and replaced the opendns nameservers with it's own:
Code:
cat /etc/resolv.conf
nameserver 192.168.1.1
I had appended the opendns nameservers onto the file:
echo "nameserver 208.67.222.222">>/etc/resolv.conf
echo "nameserver 208.67.220.220">>/etc/resolv.conf
Use static network configuration, at the moment your dns information is being provided via dhcp that is why /etc/resolv.conf is being overwritten.
Yes, I understand that.
Well, I suppose it makes sense. It's just that it's handy being able to take the server out and plug it into my network here to work on without reconfiguring.
Also, I'm a bit charry of what the D-Link router is going to do if it sees the server as a static IP.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.