Apache HTTP Server
Red Hat Enterprise Linux and CentOS Linux provide Apache and it is important that a system administrator knows how to:
- Optimise performance (section 22.214.171.124. Common Multi-Processing Module Directives)
- Set up virtual hosts (pay attention to conf.d/welcome.conf as well as the semantics of the NameVirtualHost directive)
- Set up SSL (mod_ssl needs to be installed as well as crypto-utils to generate self-signed certificates for testing purposes). Even though virtual hosting can be used on an SSL-enabled web server, in practice, SSL is used when the server is being used for one website (or web application) only. This is because a non self-signed SSL certificate is tied to both an IP and a FQDN.
Of course, Apache, using the appropriate modules, can run server-side scripts written in programming languages such as PHP and Python.
Email is an important network service and Postfix is the default email server in CentOS Linux (The venerable Sendmail is also available if needed). Postfix will handle sending emails through SMTP as well as delivering them locally. The default /etc/postfix/main.cf file does not allow Postfix to accept network connections from a host other than the local computer.
To configure Postfix to accept emails from external sources, the following needs to be done (section 126.96.36.199. Basic Postfix Configuration)
- Edit the /etc/postfix/main.cf file with a text editor, such as vi.
- Uncomment the mydomain line by removing the hash sign (#), and replace domain.tld with the domain the mail server is servicing, such as example.com.
- Uncomment the myorigin = $mydomain line.
- Uncomment the myhostname line, and replace host.domain.tld with the hostname for the machine.
- Add mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
- Uncomment the mynetworks line, and replace 188.8.131.52/28 with a valid network setting for hosts that can connect to the server.
- Uncomment the inet_interfaces = all line.
- Comment the inet_interfaces = localhost line.
- Restart the postfix service.
Any email user agent (e.g. Evolution or Outlook) can be used to test the configuration.
People who use clients like Outlook need a POP3 server and Dovecot can configured to become one:
- In dovecot.conf, indicate that “protocols = pop3″ and “listen = *, ::”
- In 10-auth.conf, indicate that “disable_plaintext_auth = no”
- In 10-mail.conf, indicate that “mail_location = mbox:~/mail:INBOX=/var/mail/%u”