Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

WHM works through Hostname but not IP

Discussion in 'Bind/DNS/Nameserver' started by trafficpullz, Nov 26, 2018.

  1. trafficpullz

    trafficpullz Registered

    Joined:
    Oct 25, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    151
    I am facing a weird problem. I am using WHM (latest build) and CentOS. CSF is present with default rules.

    When we access WHM or cPanel through hostname it works fine, but if we try to access through IP address it does not.

    The same thing on a browser - if we use the hostname in a browser it loads default cPanel page, but if we use IP address it shows "This site cannot be reached" and

    same happens testing website e.g.http://IP Address/~username does not load but
    https://host name/~username works fine.

    I checked iptables and find nothing.. tried turning CSF off but no luck..

    any help is appreciated.
     
  2. HostSane

    HostSane Member

    Joined:
    Nov 26, 2018
    Messages:
    17
    Likes Received:
    4
    Trophy Points:
    3
    Location:
    Mumbai
    cPanel Access Level:
    Root Administrator
    looks you have changed some settings in Tweak settings option of WHM , e.g. SSL redirection . please check on it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,815
    Likes Received:
    443
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @trafficpullz


    While it may be useful to check tweak settings as suggested by @HostSane I tested very briefly and wasn't able to replicate an issue with mod_userdir when using the hostname opposed to the ip address. Can you let me know the following:

    1. What is the ouput when you run the following

    Code:
    curl -kvv http://<IPADDRESS>/~$USER
    curl -kvv http://$HOSTNAME/~$USER
    then the same with https

    you can remove any php/html output I am looking for the portion that looks similar to the following:

    Code:
    [root@server ~]# curl -kvv http://<IPADDRESS>/~$USER/
    * About to connect() to <IPADDRESS> port 80 (#0)
    *   Trying <IPADDRESS>...
    * Connected to <IPADDRESS> (<IPADDRESS>) port 80 (#0)
    > GET /~$USER/index.html HTTP/1.1
    > User-Agent: curl/7.29.0
    > Host: <IPADDRESS>
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Date: Tue, 27 Nov 2018 19:33:32 GMT
    < Server: Apache
    < Last-Modified: Mon, 12 Nov 2018 15:59:19 GMT
    < Accept-Ranges: bytes
    < Content-Length: 19
    < Vary: User-Agent
    < Content-Type: text/html
    <

    2. What are your mod_userdir settings right now?

    Please do not include any output that is personally identifying but include as much detail as possible.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice