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.

virtualhost, listening on a different port

Discussion in 'General Discussion' started by rblue16, Aug 5, 2014.

  1. rblue16

    rblue16 Member

    Joined:
    Aug 5, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    I have access to a WHM/cPanel setup from a client and would like to add a VirtualHost listening on a different port. I'm not very familiar with WHM/cPanel, but I am familiar with changing Apache config files. I know in order to accomplish what I want, I would need to change httpd.conf and add the following:

    Listen <my_port>
    <VirtualHost *:port>
    ...
    </VirtualHost>

    How could I do that the cPanel/WHM way? Would I need to create another WHM account, or could I use an existing one?

    Thank you
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. rblue16

    rblue16 Member

    Joined:
    Aug 5, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Thank you for your response, Michael.

    From what I am understanding, I don't need to create another cPanel account, correct? Say that I have an account where it's pointing to: mydomain.com. What I want to do is to have mydomain.com:7000 pointing to a different folder, but it can be owned by the same user.

    And yes, I do have root access to the server.

    Thanks
     
  4. rblue16

    rblue16 Member

    Joined:
    Aug 5, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    I forgot to ask: can I create a new virtualhost using these include files, or do they only change an existing virtualhost container? If the latter, I don't see a way to create a new virtualhost directive.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You can actually modify the httpd.conf file directly if you need to, provided you use the Apache distiller after making changes. This is documented here:

    Modify the httpd.conf file directly

    As far as what custom entries to use, you may need to consult with a system administrator if you are not sure what custom modifications are required for your preferred setup.

    Thank you.
     
Loading...

Share This Page