I already installed FreeBSD 10, Apache 2.4 and PHP 5.5. I also just bought a domain from GoDaddy, and I would like to setup a web-hosting in my server, in order to make my website to be reachable from any web browser. So should be my configuration?

  1. I assigned my server (running FreeBSD 10) the static IP address

  2. My domain.com has x1.x1.x1.x1

  3. My internet service provider is (ISP) is x2.x2.x2.x2


  • From these 3 IP addresses above, which one should my httpd.conf in Apache 2.4 have to be listen to?
  • In my DNS “A” record at GoDaddy, which IP address should my domain point to?
  • Do I need to make any changes in my /etc/hosts file?

Note: I use x1.x1.x1.x1 and x2.x2.x2.x2 as examples.


a) Apache will need to listen to There's no need to specify an address though, it can listen on all addresses.

b) Whichever of 2 or 3 is the IP address of YOUR connection (as in what shows up when you browse to http://www.whatsmyip.org/).

In addition: No you do not need to touch /etc/hosts.

There's a huge piece here that you are missing however. '' is an internal (RFC 1918, not publicly routed) address. The internet cannot talk to you at that address. You need to set up a port forward from your router that will pass along the traffic destined for your public IP address to the internal

If this isn't clear enough, please detail what the IP addresses of each is. 2 and 3 don't make much sense. Not whom the IPs belong to, but what is at those IP addresses. If I'm interpreting correctly #2 is simply the IP address that GoDaddy uses to show a landing page after you register a domain. If correct, that IP is meaningless. If #3 means something other than the IP address your ISP assigned to you, then you'll have to clarify what you mean there as well.

|improve this answer|||||
  • Hi @yoonix, Please correct me if I'm wrong, I put this lines in Apache (httpd.conf): – selhan May 2 '14 at 4:05
  • Listen ServerAdmin my-email ServerName my-domain.com AddType application/x-httpd-php .php AddType application/x-httpd-source .php DirectoryIndex index.php index.html – selhan May 2 '14 at 4:06
  • This is my IP address, the one from my ISP or what I see from whatsmyip.org. – selhan May 2 '14 at 4:07
  • I’ve created a port forwarding to my internal IP address with port 80 TCP. – selhan May 2 '14 at 4:07
  • And as you mentioned in your last paragraph, you were right, #2 was an interpretation of the IP address that GoDaddy provided me from the domain I got. And #3 also was my ISP IP address which I just clear mentioned above. – selhan May 2 '14 at 4:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.