# Setting up a personal webserver through gentoo

## Elsipkitch9809

Hi,

Okay, I've been using gentoo for about over a year now, and I definitely love the configurability and power of it, and I'm curious now about how I would go about setting up a webserver.  I currently pay for one from www.hummingbirdhosting.com, but I'd like to try starting my own server from my own computer.  Maybe even build a custom machine for it later, who knows.  But I have no experience in this area, and I was wondering if anyone could point me in the best direction for tutorials, etc, for setting a server up with gentoo.  I'd like to try to make it have cgi (specifically python), server side includes, and I guess more, but I can start simple.  I'm willing to learn about security too, so I can minimize the probability of being hacked.  Any help would be greatly appreciated  :Smile: 

Thanks in advanceLast edited by Elsipkitch9809 on Tue Mar 01, 2016 5:51 am; edited 1 time in total

----------

## paranode

I'll jump in here and highly recommend the Gentoo Security guide.  I think anyone who administers a publicly accessible computer should know their stuff.  This is a great guide and the Grsecurity stuff is especially hardcore.

http://www.gentoo.org/doc/en/gentoo-security.xml

Apache also has very good documentation on their website.

http://httpd.apache.org/

Hope that helps some.

----------

## uzik

 *alaterale wrote:*   

> Hi,
> 
> Okay, I've been using gentoo for about over a year now, and I definitely love the configurability and power of it, and I'm curious now about how I would go about setting up a webserver.  I currently pay for one from www.hummingbirdhosting.com, but I'd like to try starting my own server from my own computer.  Maybe even build a custom machine for it later, who knows.  But I have no experience in this area, and I was wondering if anyone could point me in the best direction for tutorials, etc, for setting a server up with gentoo.  I'd like to try to make it have cgi (specifically python), server side includes, and I guess more, but I can start simple. 
> 
> 

 

You probably want to use something like Apache then.

http://www.apache.org/

Server side includes for a personal

web server are overkill for all but the most sophisticated

web sites. If you only need simple pages and some cgi

then take a look at Boa.

http://www.boa.org/

----------

## Elsipkitch9809

I dunno, I find SSI to be very helpful in maintaining my websites. I'll take a look at Boa though, thanks.

I'd like to start developing some CGI work for page loading to help even more with dynamic content and some recent unresolved problems with my current host are getting me to think about having my own server at home.

Thanks for the replies so far!Last edited by Elsipkitch9809 on Thu Mar 03, 2016 4:37 pm; edited 1 time in total

----------

## metalac

hmm homebased servers are not bad idea, but the problem is that you need a very high upload speed to have a decent and reasonably fast website.  you might want to give it a test and just see how fast you can server content to the world.  I hope you got at least 1mbit, because anything lower than that will crap out when 20-30 people try to access it at approximately the same time, plus make sure your ISP doesn't get pissed about you keeping a server, cuz many do.

----------

## uzik

We run one of the most popular free sites on the internet for sewing

and quilting hobbyists. We don't get 20-30 people trying to access

it at the same time. We get a few hits per second tops.

----------

## xedx

dynamic content -> Apache

static content -> fnord, thttpd, boa

 :Smile: 

----------

## elzbal

There are other basics that have not been covered, so I'd like to throw these out:

1. Do you have a static IP? If not, things could be more difficult. Look at Dyndns or another similar service. Some of these services are available for free, so check around. Look in the forums... I know this has been discussed.

2. Since you have a domain, you will want to point it at your site. You will need to run a DNS service of some kind, maybe BIND or DJBDNS? This is a topic for a whole different thread. (If you have a domain and a dynamic IP, a Dyndns-like service will point at your server for a fee.)

2a. While we are on the topic of DNS, keep in mind that you are required to have 2 DNS servers. Do you have 2 static IPs, both of which can run a DNS server? If not, do you have a friend with a static IP that can help? Some services like Dyndns can also help provide secondary DNS services. (Actually, I'm sure many folks around here could help out too, out of the goodness of their hearts.)

Let us know if you have any questions on any of these...

----------

## krinkle

yeah, like they said, make sure that your isp will let you. i was gunna run a website just for the hell of it off it (i have a cable modem, but i'd get like 10 hits a day, so i'm not too worried about bandwidth), and i couldn't get it to work.. i would have my router configured and everything, but no one could access it. turns out i can't run it on port 80, once i changed it to port 882, it worked just fine =/. another thing is that when i'm running kazaa or especially bittorrent, my internet will cut out and i have to unplug it and plug it back in again to get it to work... not sure if it has to do w/ the traffic or what, but just giving you a heads up.. best of luck

--Andrew

----------

