Apache not recognizing servername randomly
Server is using
[LIST]
cPanel & WHM 64.0 (build 24)
Easy apache 4, and apache 2.4.25-9.9.5
A new account has been created, loading any page in the domain randomly goes to default page, even a .txt file to discard script problem.
Tested with firefox and wget, sometimes the right page is server, sometimes it goes to default htdocs.
When it goes to htdocs/ the request is logged in the common access_log /var/log/access_log
with tcpdump i've captured the traffic, all requests contain the same Host: www.domain.com header correctly.
At this time i think the cPanel provided version of Apache is not correctly parsing the Host header and it seems to happen randomly.
httpd.conf has been checked, i see nothing strange in virtualhost definition, but if the virtualhost configuration was to blame, it should serve or fail always, not randomly, also httpd.conf was rebuild using /scripts/rebuildhttpdconf with no change in this strange behaviour
Any help would be appreciated.
-
A new account has been created, loading any page in the domain randomly goes to default page, even a .txt file to discard script problem.
Hello, You may want to use a website such as IntoDNS.com to verify the name servers are properly configured for this domain name, and that it's resolving to the same IP address it's assigned on the cPanel server. Also, could you verify if this system uses a NAT configuration? Thank you.0 -
It's not a DNS issue, DNS servers were changed 2 months ago by webmaster, but all my accesses were done using wget -S and all were done to my server i did tcpdump from inside the server so the answers were captured inside, showing it that the server sent different answer for the same request. The system is not behind a NAT, the answer with default page didn't came from a different server (again, tcpdump captured traffic in the server, not in the client) I've opened Ticket 8517317 0 -
Solved In case someone is interested, there was 2 httpd processes running as root, it seems the restart didn't kill the old process before adding the domain and the requests were being served by the old and the new process randomly, the new process had the domain configured, the old didn't so the old process served default password. Killing the old process solved the issue 0 -
I'm happy to see the issue is now solved. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
4 comments