Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Help me set up a server at home

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
13 posts • Page 1 of 1
Author
Message
Tuxido
n00b
n00b
User avatar
Posts: 57
Joined: Mon Apr 07, 2008 2:07 pm
Location: Trondheim, Norway

Help me set up a server at home

  • Quote

Post by Tuxido » Thu Apr 02, 2009 11:51 am

I already have Gentoo installed, and I'm going to make a LAMP-server. I have no previous experience with setting up a home server, and as suggested I need it for mail, web hosting, databases and file hosting.

First of all, I'm going to host at least two simple websites that I'm going to make and maintain myself. I have no experience with programming PHP, Perl or Python, what are the advantages of each one, and is there any difference to which one I choose? (I have some programming experience in java, if that makes a difference)

What do I need to think about before going "live" with my box? What kind of security features do I need? Is there some kind of check list I should have for myself?

How would I go about going live? (Online guide?) Do I need to have some sort of dns-server-thingy? Port forwarding? Magic?

Is there anything I need to consider that I probably won't come up with all by myself as a brand noob?

I'm hoping to use this thread to ask more specific questions as they arise, for now I just need some general tips and pointers.
"Some smart quote" -Some cult guy
Top
elgato319
Guru
Guru
Posts: 546
Joined: Thu Sep 15, 2005 9:45 am

Re: Help me set up a server at home

  • Quote

Post by elgato319 » Thu Apr 02, 2009 12:22 pm

some first comments...
Tuxido wrote:I already have Gentoo installed, and I'm going to make a LAMP-server. I have no previous experience with setting up a home server, and as suggested I need it for mail, web hosting, databases and file hosting.
mail: postfix and dovecot/courier
web hosting: apache is your friend
databases: mysql
file hosting: apache and/or webdav
Tuxido wrote: First of all, I'm going to host at least two simple websites that I'm going to make and maintain myself. I have no experience with programming PHP, Perl or Python, what are the advantages of each one, and is there any difference to which one I choose? (I have some programming experience in java, if that makes a difference)
if it's going to be for the website stick with php
good dokumentation and easy to learn
Tuxido wrote: What do I need to think about before going "live" with my box? What kind of security features do I need? Is there some kind of check list I should have for myself?
a firewall would be nice :)
be paranoid

if you are going to put something online YOU are responsible for it
Tuxido wrote: How would I go about going live? (Online guide?) Do I need to have some sort of dns-server-thingy? Port forwarding? Magic?
if you don't have a static ip for your ISP you well need a dynamic-dns (dyndns.org) or something you prefer
if you have a firewall/router you will need to port forward every service you like to offer (e.g. TCP Port 80 for HTTP)
Top
Tuxido
n00b
n00b
User avatar
Posts: 57
Joined: Mon Apr 07, 2008 2:07 pm
Location: Trondheim, Norway

  • Quote

Post by Tuxido » Thu Apr 02, 2009 10:15 pm

Okay, thanks. I'll probably be back with more questions as the arise.
"Some smart quote" -Some cult guy
Top
timeBandit
Bodhisattva
Bodhisattva
User avatar
Posts: 2719
Joined: Fri Dec 31, 2004 1:54 am
Location: here, there or in transit

  • Quote

Post by timeBandit » Thu Apr 02, 2009 10:42 pm

Be sure to review your ISP's terms of service and ensure you are allowed to host a web server or any other kind of publicly-accessible server. Here in the States that's often not the case for residential (non-business) service.
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Top
Tuxido
n00b
n00b
User avatar
Posts: 57
Joined: Mon Apr 07, 2008 2:07 pm
Location: Trondheim, Norway

  • Quote

Post by Tuxido » Thu Apr 02, 2009 11:02 pm

The terms of service didn't mention it, so I assume it's okay. As far as I understand it's not a usual thing to do here.

Just to satisfy my curiosity, why aren't you usually allowed to in the states, why does it matter to the ISP what you use your line for?
"Some smart quote" -Some cult guy
Top
DrekAlots
n00b
n00b
User avatar
Posts: 59
Joined: Fri Aug 29, 2008 12:26 pm

  • Quote

Post by DrekAlots » Thu Apr 02, 2009 11:06 pm

ISP's in the states charge more for business accounts. Therefore, you want a server and a static IP (or block of IP's), you'll have to pony up the dough. Most ISP's also limit the kind of content you can have on your website as well.
Top
Hu
Administrator
Administrator
Posts: 24400
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Fri Apr 03, 2009 2:47 am

Typically, a server will be sending more traffic than it receives. US ISPs lay out their network based on the idea that their customers will download substantially more than they upload. Servers go against that design, and are therefore deemed undesirable. This is also why US ISPs try so hard to disrupt peer-to-peer technologies: such technologies imposes substantially more upload demand than the ISPs have built their networks to handle.
Top
Tuxido
n00b
n00b
User avatar
Posts: 57
Joined: Mon Apr 07, 2008 2:07 pm
Location: Trondheim, Norway

  • Quote

Post by Tuxido » Fri Apr 03, 2009 8:06 am

When I redirect my browser to the server's ip I get Apaches standard "It Works".

I have emerged php and added

Code: Select all

-D php4 -D php5
to /etc/conf.d/apache2, restarted apache

and added the following to /var/www/localhost/htdocs/index.html:

Code: Select all

<?php

ehco 'Child of Dunwhich Rise';

?>
"It works" appears, but not my php-hello world program.
"Some smart quote" -Some cult guy
Top
Tuxido
n00b
n00b
User avatar
Posts: 57
Joined: Mon Apr 07, 2008 2:07 pm
Location: Trondheim, Norway

  • Quote

Post by Tuxido » Fri Apr 03, 2009 2:02 pm

My setup is this:

MightyInternet --> Router (with static ip) --> Wireless Router --> Server

I've set the router to forward all traffic to port 80 to the wireless router, which I've set to forward all incoming traffic to the server's IP (also static).

How can I test if this works? People outside the network can't access it through my outside IP, and when I try my outside IP I go straight to the router's interface.

What to do, and how to test?
"Some smart quote" -Some cult guy
Top
aztech
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 130
Joined: Mon Jul 29, 2002 7:20 pm
Location: Stenungsund, Sweden

  • Quote

Post by aztech » Fri Apr 03, 2009 2:10 pm

Tuxido wrote:When I redirect my browser to the server's ip I get Apaches standard "It Works".

I have emerged php and added

Code: Select all

-D php4 -D php5
to /etc/conf.d/apache2, restarted apache

and added the following to /var/www/localhost/htdocs/index.html:

Code: Select all

<?php

ehco 'Child of Dunwhich Rise';

?>
"It works" appears, but not my php-hello world program.
If you are running with the default PHP/Apache settings, you need to name all you PHP-files to *.php
Ex. index.php, instead of index.html
Top
Tuxido
n00b
n00b
User avatar
Posts: 57
Joined: Mon Apr 07, 2008 2:07 pm
Location: Trondheim, Norway

  • Quote

Post by Tuxido » Fri Apr 03, 2009 2:21 pm

aztech wrote:
Tuxido wrote:When I redirect my browser to the server's ip I get Apaches standard "It Works".

I have emerged php and added

Code: Select all

-D php4 -D php5
to /etc/conf.d/apache2, restarted apache

and added the following to /var/www/localhost/htdocs/index.html:

Code: Select all

<?php

ehco 'Child of Dunwhich Rise';

?>
"It works" appears, but not my php-hello world program.
If you are running with the default PHP/Apache settings, you need to name all you PHP-files to *.php
Ex. index.php, instead of index.html
That did the trick, thank you.
"Some smart quote" -Some cult guy
Top
Tuxido
n00b
n00b
User avatar
Posts: 57
Joined: Mon Apr 07, 2008 2:07 pm
Location: Trondheim, Norway

  • Quote

Post by Tuxido » Sun Apr 05, 2009 6:55 am

I understand that the line

Listen [port]

is used to tell apache which port to listen to, but where do I put ut?

I tried putting it in /etc/conf.d/apache2/httpd.conf after wchich I stopped seeing the "It works" page upon typing the ip and the ip followed by the portnumber (eg. 10.0.0.6:85)

And yes, I did restart apache after changing the the file.
"Some smart quote" -Some cult guy
Top
timeBandit
Bodhisattva
Bodhisattva
User avatar
Posts: 2719
Joined: Fri Dec 31, 2004 1:54 am
Location: here, there or in transit

  • Quote

Post by timeBandit » Sun Apr 05, 2009 4:44 pm

Tuxido wrote:I understand that the line

Listen [port]

is used to tell apache which port to listen to, but where do I put ut? I tried putting it in /etc/conf.d/apache2/httpd.conf after wchich I stopped seeing the "It works" page....
1. On my systems, /etc/conf.d/apache2 is a file, not a directory, and httpd.conf lives in /etc/apache2/. These were set up some years ago and the locations may have changed, but it's worth checking.

2. I found the Listen directives in these files:
  • /etc/apache2/vhosts.d/00_default_ssl_vhost.conf
    /etc/apache2/vhosts.d/00_default_vhost.conf
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Top
Post Reply

13 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic