Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
advice request for web servers solutions ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 464
Location: France, Haute-Garonne

PostPosted: Sun Oct 31, 2010 5:14 pm    Post subject: advice request for web servers solutions ? Reply with quote

Hi all,
I am going to start my first Web server. I have some questions :

1) For convenience, I would like to setup a virtual server, at least for the development phase. In production, is it safe to keep it like that, or should I migrate my server to a dedicated physical server ?

2) For the virtual server, what solution do you advise (kvm+qemu, virtualbox, xen, proxmox, openvz) for my usage ?

3) My server will have virtual hosts, because I need to create several sites. From what I have read up to now, nginx + apache + mysql or pgsql looks right, or without apache but php-fastcgi (the php-fpm implementation) with lighttpd : http://www.directadmin.com/forum/showthread.php?t=27344 . I try to find a good tutorial based on Gentoo Hardened, with all the topics addressed to build a secure/fast/optimized server. I found http://en.gentoo-wiki.com/wiki/Nginx and http://en.gentoo-wiki.com/wiki/Virtual_Webhosting_with_nginx but deal only on nginx, not nginx for static with help of apache for dynamic. Do you have the killing links ?
Back to top
View user's profile Send private message
AllenJB
Veteran
Veteran


Joined: 02 Sep 2005
Posts: 1285

PostPosted: Sun Oct 31, 2010 10:58 pm    Post subject: Reply with quote

Other than the lack of physical hardware, there's no difference between having a dedicated server and a virtual machine. The vast majority of websites will happily run on the resources of your average virtual machine (eg. ~300M or less RAM, <=10G HDD)

I use different VM setups for different purposes:

1) Virtualbox: I use this on my work desktop and laptop for running linux from Windows because it's easy and quick to configure and basically never breaks.

2) Xen. I use this on my dedicated linux box and I have a rented VM using Xen tech. The latter partially dictates the former because I can create an identical setup (or two) for compiling and testing before implementing changes to the "live" server.

Xen can be a pain to set up initially and does have a habit of breaking things when the xen/xen-tools packages get upgraded.

You also have to watch out for the different kernel patch sets available: official 2.6.18, unofficial 2.6.18+ forward ports, unofficial 2.6.18+ backports and official 2.6.34+. Note that you'll have issues with kernels < ~2.6.22 with Gentoo and udev.


My "production" VM happily runs a number of low traffic websites (apache + mysql + php + proftpd), mail server (dovecot + postfix + spamassassin), personal subversion and trac server, torrent seedbox, irssi and more, all in a ~400M RAM, 20G HDD VM with plenty of room to spare.

I also have a Gentoo VM running KVM, which I just converted from Debian this weekend. It's an old production VM which is being decomissioned, but I've converted it to Gentoo to use as a backup while I do some risky maintainance on my other VM (online expansion of the filesystem after getting an upgrade). I don't have direct access to the kernel / bootloader setup on it, so haven't had to deal with that. I haven't had much chance to look at KVM properly yet, so can't really comment on it.
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 464
Location: France, Haute-Garonne

PostPosted: Mon Nov 01, 2010 4:13 pm    Post subject: Reply with quote

Thanks AllenJB.
I found that : https://forums.gentoo.org/viewtopic-t-769136-postdays-0-postorder-asc-highlight-qemu+kvm-start-25.html
So I will have a try with KVM. So I consider question 2 closed.
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 464
Location: France, Haute-Garonne

PostPosted: Fri Nov 05, 2010 9:17 am    Post subject: Reply with quote

AllenJB wrote:
My "production" VM happily runs a number of low traffic websites (apache + mysql + php + proftpd), mail server (dovecot + postfix + spamassassin), personal subversion and trac server, torrent seedbox, irssi and more, all in a ~400M RAM, 20G HDD VM with plenty of room to spare.
So I understand that your dmz is into a VM on your working desktop. What can of setup do you use to protect your desktop ? Is it a real jail ? and what about the network ?
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 464
Location: France, Haute-Garonne

PostPosted: Fri Nov 05, 2010 9:37 am    Post subject: Reply with quote

lalebarde wrote:
TI will have a try with KVM. So I consider question 2 closed.

I don't manage to install app-emulation/kvm-kmod :
https://forums.gentoo.org/viewtopic-p-6472238.html#6472238
https://bugs.gentoo.org/show_bug.cgi?id=337834

So I am going to try xen..... from :
http://www.gentoo.org/doc/en/xen-guide.xml
https://forums.gentoo.org/viewtopic-t-420016-start-0.html

EDIT : finally, I go on with KVM-QEMU. The specific kernel sources for xen are too much a constraint for me. And I finally managed to install kvm-kmod
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum