# Short tut of starting my own web server



## psycho (Apr 3, 2010)

hello, I am starter in servers and system administration , and want to learn about it.
For beginning, I want to know what steps would I have to take, so I have my own server on my computer which would host some test web page.And i really mean my own, without having to register and pay for some host or dns service.
If you could only tell me in some short notes how should it be done?! (I don't want a full description, because that way i wouldn't learn anything, just tell me steps , and then i start investigating)
Suggestion of books is welcome too!


----------



## tkjacobsen (Apr 3, 2010)

On your computer itself all you really need is to install apache2 and start it. Going to http://localhost should then show an example page. 

If you need access from the outside you need to know your ip (since you don't want to register dns). If you have a dynamic ip you can register for free at dyndns or myip, which will provide you with a free dns name and change the destination when your ip changes using a client installed on the server. AFAIR both is available in ports.

If you have a firewall/router you need to forward port 80 to your server.

That's basically it.

Note however, that care must be taken when opening ports to the outside. You will soon find that your server is under attack constantly. Therefore you also need to know something about security. I would recommend running a publicly accessible webserver in a jail and to configure a firewall. My firewall of choice is pf but you might like one of ipfw or ipfilter better. See the firewall section in the handbook.

EDIT: Firewalls: http://www.freebsd.org/doc/handbook/firewalls.html


----------



## psycho (Apr 3, 2010)

well thank you, now I have image in my head how everything works and should look like ! i'm starting now ... and you can expect these days for some questions ^^


----------



## tkjacobsen (Apr 3, 2010)

I guess the apache page in the handbook could also help:
http://www.freebsd.org/doc/handbook/network-apache.html

Good luck!


----------

