• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Newbies wants to understand how to host/create a basic website

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #11
    Originally posted by css_jay99 View Post
    I really did not want to go with external hosting because the website traffic will only be me and just a way to further develop my knowledge of how it works and how I can use my database skills with the web. So this will teach me more about the whole infrastructure rather than relying on a hosting company.
    You can use the machine you're on at the IP address 127.0.0.1 or the host name localhost (e.g. if you're using a Mac, go to System Preferences>Sharing and enable Web Sharing, then go to http://localhost/). The IP addresses of other machines on your network may be static if you have configured them that way, or may be dynamically allocated by your router, most probably in the 192.168.x.x range. If you configure them individually with an IP address in the range your router uses (and configure your router not to give that address to anything else) then you can treat your local network as a kind of miniature Internet, allowing you to do things like run the database server on a different machine to the web server.

    By looking for information on the hosts file (which works the same way on Windows, Mac, or Linux) you can find out how to make a given machine use aliases to those other machines - for example, make dev.example.com be 192.168.1.2 while db.example.com is 192.168.1.23. (Or to point them to the same machine, if you prefer.)

    Originally posted by css_jay99 View Post
    I thought nowadays there was no need to use static IP's since there are ways of getting round that?..... some kinda domain name resolving process?
    As others have mentioned, services like DynDNS support this. Your router may well have a configuration page for setting this up. You then need to set up the router to do port mapping, to tell it which traffic should go to which machine on your network. So, you might have traffic for port 80 (the default for HTTP, i.e. the web server) sent to 192.168.1.5, while port 3306 is the default port for traffic for the MySQL db server, so you send that to 192.168.1.3. Your router's manual should go into more detail about what exactly you need to do, and there are plenty of generic how-to guides online to help you get your head around the basic principles.

    The main advantage of this is that you then have access from outside your internal network, although you then also need to be more aware of security as suddenly your home machines (at least the ones you've port mapped, and potentially the others by leapfrogging from them) can be reached directly over the Internet: using "fred" as the password for your local database root account is no longer an option. I tend to enable port mapping only when I know I'm going to be using it, and turn it off again afterwards.

    It really isn't that complicated once you get into it; conceptually, it's no harder than hooking up a TV plus HDD Recorder plus Freeview box such that all the signals go to and from the right places in the right order. The IP addresses are the colour coded connectors, and the names are the labels you attach to the connectors because it's easier than having to remember what yellow means.

    Comment

    Working...
    X