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.

Using cPanel for one IP and site

Discussion in 'General Discussion' started by Evilcyber, Mar 30, 2010.

  1. Evilcyber

    Evilcyber Registered

    Joined:
    Mar 30, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    We recently rented a VPS to run one site that was supposed to have one IP directly leading to it.

    The hoster's instructions had me install WHM / cPanel and set up a master reseller account. As I had little idea how to do the setup, I did just that and now all site files are in the account of that user and entering the IP of the VPS results in cPanel displaying its "server installed" message, not showing the site.

    Question now is: Can I use WHM / cPanel so that the IP leads to the site's files or do I have to uninstall cPanel? Right now when I put files into var/www/html at root, as I apparently should have done, I still get the cPanel server message.

    Your help would be much appreciated.
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    So you only have 1 IP address?

    First, I would tell you that your VPS provider is apparently pretty crappy because you really need 2 IP addressees minimum to be able to effectively run DNS or to have any e-commerce use for your server, etc

    Second, if you are trying to access the server by IP address and only have a shared IP address then you are in trouble anyway as far as accessing your site by IP address and E-commerce is pretty much out of the question.

    You could have your site displayed under the IP but it would require manual modifications to your Apache configuration at the system level and it does not sound to me from your post that it would be wise trying to instruct you to do that as I gather you may not be in a sound technical position to do that. However for reference, the first virtualhost section from the top down in your httpd.conf is the one displayed by IP and that is usually the Cpanel default page which could be changed but not recommended for a lot of reasons though I would be perfectly glad to help you do that if you are really dead set on doing that.

    However ....

    It is much simpler on you and all around to just simply add another IP and that could be used for your secondary DNS, your SSL certificate IP, and your site be accessible directly by IP without custom modifications so it works far better all around.
     
  3. Evilcyber

    Evilcyber Registered

    Joined:
    Mar 30, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    No, it has two IP addresses, but it's just one that the website should be reachable under.

    The server runs CentOS and from what I gathered html should be placed /usr/local/apache/htdocs to have them display under the IP address instead of IP/~username.

    If this is possible, I'd be very glad if you give me some pointers on how to do it and configure the server files.

    The reason for me to want that is not recklessness, but that we have a live forum there and installing the server from scratch would cause major disruption.
     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    If you have 2 IPs then the first is going to be your "shared" IP address and is meant to be used for sites accessible by DOMAIN NAME only and are not really meant to be accessed by IP address.

    The second IP on your server will be a DEDICATED IP and the site that you place on that IP address will be directly accessible by IP number automatically straight from the start.

    If you setup your site on the shared IP but really do in fact have 2 IPs for your server then you got 2 options available to you that would not require having to go in and manually edit a lot of things:

    A) Change the "shared" IP address over to the other IP address

    B) Change the IP for the web site to the other IP address

    Either of these should take care of your issue

    (Note, changing IPs on a site can make the site appear down to you for a day or so until the DNS and route caching get updated in your computer)

    Forget about mod_userdir (~username stuff) ....

    The location you just named is the location of the DEFAULT PAGE that Cpanel shows when there is no hostname provided. It is only configured to run plain HTML files and with good reason and not really meant to place any real web site there. It is shown by default because it is the first virtualhost encountered reading down from the top of the httpd.conf configuration file for Apache (/usr/local/apache/conf/httpd.conf) which is is how Apache chooses a web site to display when no domain name is provided.

    Not a problem :)

    I do not follow or understand what you are thinking by that statement ...

    What do you mean by "installing the server from scratch"?

    Why in the world would you "install the server" again?
     
  5. Evilcyber

    Evilcyber Registered

    Joined:
    Mar 30, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I wasn't precise: I meant to rebuild the server.

    Thank you for your help so far! I understood now that I have two IPs: One is shared and the other dedicated, under which a root website can be set up.

    Now where exactly do I change the IPs?

    I'm sorry if I sound dense.
     
Loading...

Share This Page