The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can i access a website IP Only in shared IP VPS

Discussion in 'General Discussion' started by KHA, Aug 25, 2016.

  1. KHA

    KHA Member

    Joined:
    Aug 25, 2016
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Dubai
    cPanel Access Level:
    Root Administrator
    Hello,

    I have VPS with one IP address and only one domain is hosted on that VPS.
    I need to access my domain with IP like
    http://x.x.x.x
    should load my domain, i have read many posts but nothing is working for me.

    i have changed
    /usr/local/apache/conf/httpd.conf

    with bellow options
    NameVirtual host entry:

    <VirtualHost x.x.x.x:80>
    ServerName x.x.x.x (server internal IP)
    DocumentRoot /home/domain/publichtml
    ServerAdmin mail
    <IfModule mod_suphp.c>
    suPHP_UserGroup nobody nobody
    </IfModule>
    UserDir disabled
    </VirtualHost>

    above is not working,

    then i change

    <VirtualHost x.x.x.x:80>
    ServerName x.x.x.x (server Web IP)
    DocumentRoot /home/domain/publichtml
    ServerAdmin mail
    <IfModule mod_suphp.c>
    suPHP_UserGroup nobody nobody
    </IfModule>
    UserDir disabled
    </VirtualHost>

    but this is not working too.

    after i change in Define default vhosts for shared IPs

    <VirtualHost x.x.x.x:80>
    ServerName x.x.x.x
    DocumentRoot /home/domain/publichtml
    ServerAdmin email

    <IfModule suphp_module>
    suPHP_UserGroup nobody nobody
    </IfModule>

    </VirtualHost>

    this is also not working.

    just to be sure every time i restart APACHE or even restart VPS but its same.
    every time i see sorry page ...

    how to fix this?

    Thanks
     
    #1 KHA, Aug 25, 2016
    Last edited by a moderator: Aug 25, 2016
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,666
    Likes Received:
    646
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Do you want to the public to access the website directly via the IP address? If not, I suggest modifying the hosts file on your computer to temporary point the domain name to the IP address associated with your server:

    hosts (file) - Wikipedia, the free encyclopedia

    You can then browse to the domain name itself before changing the DNS.

    Thank you.
     
  3. KHA

    KHA Member

    Joined:
    Aug 25, 2016
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Dubai
    cPanel Access Level:
    Root Administrator
    Hello @cPanelMichael,

    Thanks for reply.

    actually i am trying to run a application on my VPS which need to run on domain and subdomain or IP address.

    so i have hosted a domain and uploaded the application and its working fine.
    like my application is opening fine from

    http://domainname.com

    now i want to access same application from sub domain like

    http://sub.domainname.com

    I have created a A record in Domain DNS (WHM) pointing to IP of my server.

    but this is also not working, when i type http://sub.domainname.com i got bellow page

    http://sub.domainname.com/cgi-sys/defaultwebpage.cgi

    as sub domain is not working, i also try to open application from IP address and did all settings in
    /usr/local/apache/conf/httpd.conf
    restart Apache

    again its not working and going to same page
    http://sub.domainname.com/cgi-sys/defaultwebpage.cgi

    As i wrote above, i have VPS with one IP address & only one Domain Hosted , but IP is shared with

    host.domainname.com domainname.com

    how can i do any of following

    1. Open domain with Subdomain ?
    2. Open Domain with IP address ?

    Thanks
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,666
    Likes Received:
    646
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you check to verify the IP address that subdomain resolves to from your workstation is the same IP address configured for the account in Web Host Manager? Also, could you clear your browser and DNS cache to verify that's not the reason you see that message?

    Thank you.
     
  5. KHA

    KHA Member

    Joined:
    Aug 25, 2016
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Dubai
    cPanel Access Level:
    Root Administrator
    Hello,
    Yes my domain and sub domain resolve to same IP address.
    also i cleared my DNS and browsing history but its still same.

    As i wrote I have Single IP on server and only one domain is hosted on that VPS.

    Thanks
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,666
    Likes Received:
    646
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you verify the subdomain is listed in cPanel, in addition to resolving to the correct IP address? The subdomain should load as long as it's added to cPanel and the "A" record is configured.

    Thank you.
     
Loading...

Share This Page