Apache fails to load resource files to internal requests but serves fine to external requests

607 views Asked by At

Our development webserver has started giving 'connection reset' errors to browsers for the same files in pages but only if we use the internal network to request from. If I connect from home then the requests are served fine.

The apache logs show that the GET was served fine with a 200 status but the image / css files / js wont load in a browser, even if the path is copied to the address bar. other files in the page load fine - and its always the same files that fail. Externally there are no problems.

Perhaps of importance is that all of the files that fail to load are 4kb. Adding random code in comment blocks to the files to alter their filesize and they will load correctly. Take that block of content out and the file fails to load again. Its a similar story with binary files ( images ). Files of 4kb are not loaded, Opening the file in say, fireworks and then savine that file and it will load fine internally - the filesize goes up to 16kb. There is nothing wrong with the files before this though - they preview / open fine, images can be seen or text can be read, there is no corruption - they are served OK if the request comes from another internet connection.

I tried moving the websites to another mac - the same issue from inside our network and fine from outside again. I downloaded an installed a newer version on the MAMP server and copied the htdocs contents in - same problem.

I have cleared caches, fiddled with MTU settings, replaced routers and a host of other things to no avail. Im pretty sure that it is linked to the Mac filesystem as the files themselves are the only common factor when tested on other computers.

The environment is an iMac, Mac OS x 10.6 Snow Leopard, MAMP 2.0 as well as MAMP 1.9.

The page is PHP based serving HTML with linked javascript / css / images.

1

There are 1 answers

0
Ben Duffin On BEST ANSWER

It would seem that the error had nothing to do with apache or software or the computer - there must have been a fault with the first router followed a fluke identical fault on the second. We have now installed a brand new Netgear router and have not had a single issue since.

Would have been nice to have figured out what was actually wrong with the router in the first place but that doesn't matter - its working again!