Situation: I have Apache2 server with Linux Ubuntu OS 11.10. Then I install a PhP5, MyAdmin, DNS server, LAMP server, MY SQL server.

This is what I have done:

  • check localhost and it works!
  • edit index.html default webpage located in /var/www
  • change my IP address to static
  • restart /etc/init.d/apache2 restart {OK}
  • bought a domain name
  • turn off Firewall on my router

Now I need Your HELP!

Please tell me how and what needs to be done that other people around the world can type my domain name and connect to my server and default web page index.html located in /var/www?

I do not care about security. I changed permission on /var/www/ to 777 for the moment, because I want to host my simple website or webpage but only on my local server. THANK YOU this is my first server and I guess YOU got the point. If possible step by step.


You need to do 2 things:

  • configure nameservers (probably in some control panel of the registrar from which you bought the domain) to point the A record to the (static) IP address of your router (i.e. its external address) - I hope by "I changed my IP address to static" you mean that you contacted your ISP and requested a static IP address from them, not that you configured your machine's local IP to be static (though the latter is needed too)

  • Secondly, you go to your router's configuration page (see your router instructions, usually it's something like and configure Port Forwarding - i.e. you need to tell your router to take all requests which come to its external interface on port 80 and redirect them into internal network to the IP of your server, then take the response and send it back as if it was generated by the router. So for external world the responses will be coming from the external IP of the router. To which IP your DNS records point to. Easy-peasy.

Also, some ISPs, to protect users, block all incoming connections to the client's IPs or only to some common ports. So the access from outside may not work even if everything is configured correctly. You will need to check with your ISP to figure out how to remove port blocking.

There's no need to change anything in your Ubuntu settings, no need to change permissions on /var/www or anything... as such, it may be beneficial for you if this question was migrated to serverdefault.

| improve this answer | |

First, you will need to make sure you configure port forwarding on your router so that when someone tries to access the IP address of your router, it will be redirected to your server. At that point, anyone could type in your ip address (the external one when you type "what is my ip" into google, not the internal one on your LAN) and it should pull up your web site.

Next you need to match your domain name to that IP address. You would do this through GoDaddy or whatever registrar you used.

| improve this answer | |

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.