# Apache - IP address default port?



## Draucia (Apr 22, 2012)

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:


```
Listen 78
```

and


```
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?


----------



## SirDice (Apr 23, 2012)

_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?


----------



## UNIXgod (Apr 23, 2012)

You can forward request to 80 to port 78.


----------



## Draucia (Apr 23, 2012)

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?


----------



## SirDice (Apr 24, 2012)

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.


----------



## Draucia (Apr 24, 2012)

SirDice said:
			
		

> 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.



No I already have a 'real' domain. How do I get it to work with apache? Is BIND necessary for this?


----------



## SirDice (Apr 24, 2012)

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.


----------



## Draucia (Apr 24, 2012)

SirDice said:
			
		

> 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.



Ok I got it, I had to use the "A Record".


----------

