From Funtoo
Revision as of 21:06, May 10, 2015 by Threesixes (talk | contribs)
Jump to: navigation, search

Pre-install considerations


Ssl wild card certificates can use the same certificate to cover several subdomain names. As in https://wiki.funtoo.org https://www.funtoo.org https://forums.funtoo.org can all use the same certificate. https://funtoo.org would not be covered under the wildcard, so Threesixes (talk) suggests using http://domain.tld as a http navigation splash page directory. All that is required to setup a ca signed ssl certificate is an email on the server. https://www.startssl.com offers free ssl ca certificates, though there are several other certificate providers. Many web apps require you set your URL & will have problems if your URL is set to http://, rather than https://

sockets vs tcp stack

Sockets have less overhead but can not be shared across jails, or to other machines. Tcp stack has more overhead but is far more flexible.

Email Servers

  • mail-mta/postfix <-- suggested
  • mail-mta/ssmtp
  • mail-mta/exim
  • mail-mta/sendmail
  • mail-mta/nullmailer

FTP Servers

It is common practice to use FTP servers to host files for downloading.

  • net-ftp/vsftpd <-- suggested
  • net-ftp/proftpd
  • net-ftp/pure-ftpd
  • net-ftp/qshare


Web servers come in several varieties. The most common stack is known as LAMP which stands for linux apache mysql php. Threesixes (talk) suggests setting up the web server stack by selecting the database first, then scripting language second, and web server 3rd.


  • dev-db/mysql

mariadb is a drop in replacement for mysql

  • dev-db/mariadb <-- suggested for mysql users

percona is a drop in replacement for mysql

  • dev-db/percona-server
  • dev-db/postgresql-server <-- suggested over mysql
  • dev-db/sqlite


  • dev-lang/php <-- suggested
  • dev-lang/perl
  • dev-lang/python

Web Servers

  • www-servers/apache
  • www-servers/cherokee
  • www-servers/nginx
  • www-servers/tengine <-- suggested
  • www-servers/lighttpd

SSL Termination, Reverse Proxies, Caching, & load balancing

Reverse proxies are useful, some cache static data, and shuck out cached pages rather than hitting the web server. Some pass requests to backend nodes high availability clustering your website, some web servers have this functionality built in.

  • net-misc/memcached <-- suggested database cache to speed up database queries.
  • dev-db/redis
  • www-servers/nginx
  • www-servers/tengine
  • net-misc/stunnel
  • www-servers/pound <-- suggested for ssl termination & load balancing
  • www-servers/varnish <-- suggested for caching to reduce power consumption & reduce the need of constantly rebuilding pages
  • net-proxy/squid

Post install

There are several considerations to take into account with a web server install, such as setting up an email server, setting up a firewall, firewalling web applications, and dynamically firewalling attackers.


  • net-firewall/nftables <-- suggested
  • net-firewall/iptables
  • net-firewall/firewalld note: broken under *too
  • net-firewall/ufw

Dynamic Firewalling

  • app-admin/sshguard <-- suggested
  • net-analyzer/fail2ban

Webapp Security

Install mod_security on your web servers. See the open web app security project


It's a good idea to benchmark your system, server, & websites. There are several tools to assist you in doing this.