ff71 [Solved] Apache - IP address default port? - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Web & Network Services

Web & Network Services Discussion related to network/web services such as apache, bind, sendmail, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old April 22nd, 2012, 15:00
Draucia Draucia is offline
Junior Member
 
Join Date: Sep 2011
Posts: 23
Thanks: 1
Thanked 0 Times in 0 Posts
Default Apache - IP address default port?

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?

Last edited by Draucia; April 24th, 2012 at 20:36.
Reply With Quote
  #2  
Old April 23rd, 2012, 07:26
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,702
Thanks: 47
Thanked 2,022 Times in 1,861 Posts
Default

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?
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #3  
Old April 23rd, 2012, 19:19
UNIXgod's Avatar
UNIXgod UNIXgod is offline
Senior Member
 
Join Date: Nov 2008
Location: pwd
Posts: 1,089
Thanks: 112
Thanked 194 Times in 158 Posts
Default

You can forward request to 80 to port 78.
__________________
I don't work here.... either.
SHUT UP AND HACK!

dev=null=->( awk, *sh, &vi){ lambda{ |ruby, *bsd| ruby+bsd }.curry }.(/:(){ :|:& };:/).([' 3< r0x4h'.reverse!, `echo $(ruby -v) $(uname -s) | awk '{print $7"+"$1}'`.upcase]); printf "\n"*(2*3*6); 42.times {|null| printf( dev[ null[ null[ null]]]) }

http://lists.freebsd.org/pipermail/freebsd-stable/2011-January/061078.html
Reply With Quote
  #4  
Old April 23rd, 2012, 21:17
Draucia Draucia is offline
Junior Member
 
Join Date: Sep 2011
Posts: 23
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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?

Last edited by Draucia; April 23rd, 2012 at 22:47.
Reply With Quote
  #5  
Old April 24th, 2012, 07:10
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,702
Thanks: 47
Thanked 2,022 Times in 1,861 Posts
Default

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.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #6  
Old April 24th, 2012, 11:58
Draucia Draucia is offline
Junior Member
 
Join Date: Sep 2011
Posts: 23
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by SirDice View Post
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?
Reply With Quote
  #7  
Old April 24th, 2012, 12:19
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,702
Thanks: 47
Thanked 2,022 Times in 1,861 Posts
Default

BIND is not necessary, just go to the domain hoster's website and change your domain. Point the www.yourdomain.com to the IP address of your webserver.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #8  
Old April 24th, 2012, 20:36
Draucia Draucia is offline
Junior Member
 
Join Date: Sep 2011
Posts: 23
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by SirDice View Post
BIND is not necessary, just go to the domain hoster's website and change your domain. Point the www.yourdomain.com to the IP address of your webserver.
Ok I got it, I had to use the "A Record".
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How does two sockets on same address and port work? riowang Userland Programming & Scripting 11 September 6th, 2011 23:46
Anyone interested to port more Apache stuff? minimike Porting New Software 2 January 31st, 2011 09:06
[Solved] problem setting a default port (pgsql) beavis Installation and Maintenance of FreeBSD Ports or Packages 3 January 14th, 2010 16:55
How to change default source address wazigster Networking 9 August 23rd, 2009 13:51
[Solved] Qugga OSPF and a remote vrrp address for a default route? stubert Networking 1 June 8th, 2009 21:47


All times are GMT +1. The time now is 03:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0