1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache - IP address default port?

Discussion in 'Web and Network Services' started by Draucia, Apr 22, 2012.

  1. Draucia

    Draucia New Member

    Messages:
    23
    Thanks Received:
    0
    I'm really new to apache (and I'm a newbie in networking), but how do I make my IP go to a default port? In apache I have:

    Code:
    Listen 78


    and

    Code:
    ServerName 98.30.28.127:78


    But when I type in 98.30.28.127, it doesn't work. I have to type 98.30.28.127:78 for it to work. Is it possible to make 78 the "default" port so when I go to 98.30.28.127, it goes to 98.30.28.127:78?

    Another question: How can I make a domain work with apache? On my domain control panel, I can set a redirect and specify DNS name servers. It won't let me redirect to an IP address, so how can I use a domain with apache? Is this process complicated?
     
  2. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,521
    Thanks Received:
    2,351
    Any request for http://98.30.28.127 will go to port 80. There's no way to change this default.

    Why on earth would you want to run your webserver on port 78?
     
  3. UNIXgod

    UNIXgod New Member

    Messages:
    1,089
    Thanks Received:
    195
    You can forward request to 80 to port 78.
     
  4. Draucia

    Draucia New Member

    Messages:
    23
    Thanks Received:
    0
    Well it wasn't working before so I thought it was blocked. I port-forwarded port 80 and it worked. And to my next question: Is it complicated to set up my domain to work with apache so it points to my IP? I think I have to use BIND but configuration seems really complicated. Is there an easier way?
     
  5. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,521
    Thanks Received:
    2,351
    It depends on what you want to do. If you want a 'real' domain you'll have to register for one with a registrar. If you just want something to test on your own network BIND will do quite nicely.
     
  6. Draucia

    Draucia New Member

    Messages:
    23
    Thanks Received:
    0
    No I already have a 'real' domain. How do I get it to work with apache? Is BIND necessary for this?
     
  7. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,521
    Thanks Received:
    2,351
    BIND is not necessary, just go to the domain hoster's website and change your domain. Point the http://www.yourdomain.com to the IP address of your webserver.
     
  8. Draucia

    Draucia New Member

    Messages:
    23
    Thanks Received:
    0
    Ok I got it, I had to use the "A Record".