Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Random 400 Bad Request Error Apache2 / NGINX
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Random 400 Bad Request Error Apache2 / NGINX

Not sure if this is an issue or not.

Configuring apache2 on a vps, I am randomly getting a 400 bad request error and the only other thing displayed on the page, is NGINX. It only seems to happen when I try to go to www.domainname.com vs just going to domainname.com, or the ip address.

I am running virtual hosts, one pointing to the IP Address of the VPS, and the other pointing to my domain (just purchased from namecheap). i've not seen this issue before, however ive seen some posts online that indicate that it is an NGINX / large cookie issue, and to modify that in NGINX, which, is not currently installed on my VPS. I have also seen that this could possibly be due to propagation of DNS records for the new domain. Is this something I should be worried about?

Comments

  • ping www.yourdomain.com then ping yourdomain.com

    Are the IPs the same as your server? If not then you have a DNS issue, check your DNS is pointed to the right IPs

  • Please, provide the real domain as we can see if it is a DNS problem. Anyway, you should provide at least the apache error log. Without it any replies will be no more than guesses.

  • The site is devip.xyz. I went through the logs, and not seeing anything.

    I've been recehcking the site since getting home from work, and ive not gotten the error again.

  • afterSt0rmafterSt0rm Member
    edited October 2015

    I don't see any problem with the actual DNS:

    devip.xyz. 300 IN A 104.223.92.126
    www.devip.xyz. 300 IN CNAME devip.xyz.

    Ping will return the same address:

    $ ping devip.xyz
    PING devip.xyz (104.223.92.126) 56(84) bytes of data.
    $ ping www.devip.xyz
    PING devip.xyz (104.223.92.126) 56(84) bytes of data.
    

    And your redirect from non-www to www is working well and will return the same WordPress website when using curl (will not post the curl output for html code, only the headers):

    $ curl devip.xyz -LI
    HTTP/1.1 301 Moved Permanently
    Date: Thu, 15 Oct 2015 02:36:49 GMT
    Server: Apache/2.4.10 (Debian)
    X-Pingback: http://www.devip.xyz/xmlrpc.php
    Location: http://www.devip.xyz/
    Content-Type: text/html; charset=UTF-8
    
    HTTP/1.1 200 OK
    Date: Thu, 15 Oct 2015 02:36:50 GMT
    Server: Apache/2.4.10 (Debian)
    X-Pingback: http://www.devip.xyz/xmlrpc.php
    Content-Type: text/html; charset=UTF-8
    
    $ curl www.devip.xyz -LI
    HTTP/1.1 200 OK
    Date: Thu, 15 Oct 2015 02:36:41 GMT
    Server: Apache/2.4.10 (Debian)
    X-Pingback: http://www.devip.xyz/xmlrpc.php
    Content-Type: text/html; charset=UTF-8
    

    The only problem that I can see is with browser/ISP/DNS caching from the network you was using to access your website. You should take a time to learn how to use basic tools as dig, mtr, ping and curl to debug problems like that one, it will make you happy.

    Thanked by 1vpsGOD
Sign In or Register to comment.