0

I have a windows 2012 R2 server with Apache, MySQL and PHP and have some domains pointed to it. I have the windows DNS service and everything works, I can access it externally and all that but sometimes it stops working.

If I RDP into the machine I can try localhost and it works but externally it doesn't (when this happens) that lead me to think it could be a DNS issue, however if I just restart Apache it starts to work externally again.

I restart the apache by using the net start and net stop command. I set two tasks on the server so every 12 hours the apache is restarted however this doesn't seem to fix the issue as sometimes it still becomes inaccessible externally and restarting is the only way to solve the issue.

I want to reiterate that is not that I can't access externally, the problem is that I can but at some point it stops working and only works internally. If I set internally in the hosts file my domains to point to 127.0.0.1 it works so I'm not sure what the issue can be, seems like is DNS related but only after restarting apache works again. Restarting DNS I think has no effect on the issue

Thanks.

4
  • What ever it is, we can say for sure it's not related to DNS. It seems externally and with a hostname means the same to you, but that's not true. If you test the external connection with the DNS hostname and the internal connection using IP, you lose part of the ability to delimit the problem. Oct 13 '17 at 10:28
  • Therefore, you should try to connect the server using its external IP address, instead. When not working, check whether Apache is listening on port 80 on that interface or do you have another service (like IIS) bind there instead. You could use Sysinternals TCPView for that. Oct 13 '17 at 10:28
  • Thanks Esa, I'm still investigating. When this happens I can't even access using the ip address and I've found that there are a lot of connections to the port 80 in the state close_wait might that just be that the server has all is sockets occupied?
    – Wallack
    Oct 13 '17 at 15:11
  • Or the way Apache handles connection. Please edit your question to include Apache configuration regarding how many connections it accepts and how it handles connection keep-alives etc. Oct 13 '17 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.