Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have this weird problem with apache. First, a little bit of background:

I'm using XAMPP - but i tested wamp and vanilla apache, various versions - to do local (php) development on a Win7 Pro x64 machine. I also have a public IP, which is accessible from the outside. This works just great, speedy and peachy.

However, if I'm trying to access the apache from another PC/iPhone/whatever in the network, it takes a lot. a lot! to connect. However, after the connection is made, files are downloaded pretty fast (8mb/sec).

Also, i noticed that Vagrant is very slow (is what made me to think on this as an issue; first i was thinking that is only my apache configuration)

So, long story short:

  • user from outside the network can access my PC with no problem
  • local users must wait ~10-20 seconds for a simple page load (php, html, doesn't matter)
  • xampp installed on another pc on network works ok
  • lan sharing works just fine
  • firewall is off, antivirus (avast free) was off for tests

I'm on win 7 pro, updated.

Things to consider:

  • apache run on port 80 or 81 or 8081 or whatever, same result every time
  • changing OS (e.g.: use mac) it's not an option :)

So, what the hell should i look for? Any ideas?

Thanks!

share|improve this question
    
How are you trying to access apache? By IP or hostname? http or https? Network works fine (ping, traceroute, ...)? –  Jure1873 Oct 4 '12 at 21:23
    
@Jure1873: I'm trying to access it by IP, http. Everything else that is network related works just fine, the look up takes forever. –  Ionut Staicu Oct 5 '12 at 3:43
    
Long initial time-outs usually indicate an issue with name-resolution, so you should check your DNS configuration - make sure it's resolving properly, and that the IP it's resolving to is the right one. –  HopelessN00b Oct 8 '12 at 0:46

1 Answer 1

most likely have something to do with DNS

* UPDATE *

run ipconfig /all look up at your DNS server, and try to resolve hosts that is hitting your apache, run it against every DNS server that you see in the list, at least one of them will take long to look up record and that's the one which is causing slowness

share|improve this answer
    
thanks. can you give me more details? I really have no idea what to look for... –  Ionut Staicu Oct 4 '12 at 18:16
    
It's likely that Apache is attempting reverse DNS lookups on your LAN when the request happens. If this is the case, the lookup has to complete, or timeout (in your case), before the HTTP GET is processed and response sent. Check out the HostnameLookups configuration directive in httpd.conf. –  Sean C. Oct 4 '12 at 18:28
    
Sean, HostnameLookups was off. Switched to On with no luck. –  Ionut Staicu Oct 4 '12 at 18:36
    
HostnameLookups is off by default and it should be kept that way –  alexus Oct 4 '12 at 19:27
    
Alexus, thanks for the updated. Here is what i have on the main LAN card: gist.github.com/2fd4eb5be640c4e08def I realized that things are slow even if I'm trying to connect from a virtual machine. –  Ionut Staicu Oct 5 '12 at 3:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.