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!

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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    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