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.

Setting up domains like: domain.com:24

Discussion in 'General Discussion' started by NeedHelp, Sep 23, 2005.

  1. NeedHelp

    NeedHelp Active Member

    Joined:
    Sep 7, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Does anyone know how to setup a domain to use the following:

    domain.com:24/cgi-bin/...

    Please advise
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You'd need to configure apache in httpd.conf to listen on port 24 and then modify the virtualhost container for that domain to use port 24. You then need to ensure that if you have a server firewall that you allow traffic in on port 24 and then make sure that all URL's on the site specify the port.
     
  3. NeedHelp

    NeedHelp Active Member

    Joined:
    Sep 7, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    question

    Is there a step by step guide on how to do this? I'm somewhat new to this area.
     
  4. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    If you currently have no idea of how to do this, you could do well to stay away from such changes.

    However, your best option would be to hunt around on the web, for example using Google, finding out how to configure Apache as this will prove most useful.

    Out of interest, why do you want to do this? Since you have quite an odd requirement, there's a fair chance that there is a much better solution to whatever your problem may be.
     
  5. NeedHelp

    NeedHelp Active Member

    Joined:
    Sep 7, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    I'm looking at doing this because I purchased a domain that previously was setup similar to this and the traffic is being drawn from that. I've tried pointing the domain, but it doesn't carry over, nor is it picked up by the 404.shtml page.

    I figured my only option was to recreate the path.

    Where do I find the httpd.conf? Is it in WHM or from CPanel?
     
    #5 NeedHelp, Oct 1, 2005
    Last edited: Oct 1, 2005
  6. Devil Inside

    Devil Inside Well-Known Member

    Joined:
    Apr 4, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    Against my better judgement - I'm going to contribute.

    But follow this warning!
    BACKUP THE FILE BEFORE EDITING/SAVING :)

    That said...
    You'll need to shell into your box and edit the file located here:
    /usr/local/apache/conf/httpd.conf

    The virtual host entry will be toward the bottom of the file.

    Once you have edited it the way you need, run this command to restart apache:
    service httpd restart

    If you get errors - you broke it. :eek:

    Which will leave you pretty much screwed if you don't know how to fix it and didn't follow my warning ;)
    Otherwise... restore the backed up file and restart apache again to get it back up.

    Hope this helps
     
  7. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    You will need to do this

    ssh into the box

    vi /usr/local/apache/conf/httpd.conf

    scroll down to the proper virtual server entry

    right above the virtual entry add this

    Listen 24

    NameVirtualServer <your ip>:24

    then add :24 to the end of the ips in the virtual server entry

    USE AT YOUR OWN RISK

    save changes

    service httpd restart
     
  8. NeedHelp

    NeedHelp Active Member

    Joined:
    Sep 7, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    A friend of mine was able to do this. My next obstacle is, how do I access the new port, to setup /cgi-bin/ or index files, etc. Or possibly redirect that port.
     
  9. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    to access via web browser you would use http://<domainname>:24

    to access via ftp just access using the domainname and account user and pass

    to access via cpanel you will access the account normally
     
  10. NeedHelp

    NeedHelp Active Member

    Joined:
    Sep 7, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    When I login via FTP, it doesn't show the port. Where might it be located so that I can create folders and files in it?
     
  11. NeedHelp

    NeedHelp Active Member

    Joined:
    Sep 7, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    A friend setup the port as :81. How do i develop/place files in this area?
     
  12. Xenon101

    Xenon101 Well-Known Member

    Joined:
    Mar 13, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    All files should be placed into public_html as normally. The port doesn't change any of the folder structure, its just the port on which the http server (apache) listens on.
     
  13. NeedHelp

    NeedHelp Active Member

    Joined:
    Sep 7, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Do I need to remove the other ports that are there from when the account was setup before files will work from that port (i.e. .com:81/file/files.html)? When I load a preexisting URL using the port in the domain, it goes to a 404 Page Not Found page.
     
  14. NeedHelp

    NeedHelp Active Member

    Joined:
    Sep 7, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Any thoughts on my previous post?
     
  15. networxhosting

    networxhosting Well-Known Member
    PartnerNOC

    Joined:
    Apr 22, 2003
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Hamilton, Ontario, CANADA
    you could always port forward port 24 --> 80 to solve your issue as well..
     
  16. NeedHelp

    NeedHelp Active Member

    Joined:
    Sep 7, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Please advise on how to forward the port.
     
  17. NeedHelp

    NeedHelp Active Member

    Joined:
    Sep 7, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Please advise on how to forward the port. Please provide as much detail as possible.
     
  18. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Comments like the above very much scare me ...

    /etc/httpd/conf/httpd.conf
     
  19. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If you need help doing that, you should hire yourself a server admin to do the work for you. These forums really are not the place for such basic server admin tasks.
     
  20. NeedHelp

    NeedHelp Active Member

    Joined:
    Sep 7, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    In "/etc/httpd/conf/httpd.conf"

    What is typed or done to create the forward?
     
Loading...

Share This Page