Web Server Design, Installation, Configuration, Analysis, and Monitoring

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License . Essentially, you can use, reuse, share, and rebuild but acknowledgement and credit are required. No commercial use permitted. Follow the link for legalities and details.

Please note that this document version is #1441738404 and was generated on Sep 08, 2015 at 13:53:24. Check back for updates.


Table of Contents

Preface
Introduction to the webserver Class
Background Info
Audience
Course Format & Communication
Reasonable Expectations
Operating System & Platform
Suggestions for the Course
1. Rackspace
Rackspace Introduction
Rackspace Account
Rackspace Login
Rackspace Interface
Rackspace Account Check Point
2. Rackspace Virtual Machine
Design and Launch via Rackspace Interface
Machine Design Considerations
Launch the Machine
'ping' the Virtual Machine
Initial Login to the Virtual Machine
Machine Monitoring Considerations
Virtual Machine Check Point
3. Domain Name System
Introduction to DNS Configuration
Purchase Domain Name Through the Registrar
Configure Name Servers at the Registrar
Configure DNS for Rackspace Machine
Name Server Entries
Verify DNS with `ping` & `dig`
DNS Check Point
4. Machine Configuration
Introduction to Machine Configuration
Update the Machine
Hostname
Set the Correct Time Zone
Adding a Regular User
Firewall Introduction
SELinux
Machine Configuration Check Point
5. SSH
Introduction to the SSH Protocol
SSH Client
SSH Connection
SSH from Windows Machine
SSH Server
SSH Access Logs
Additional SSH Configuration
SSH Check Point
6. Apache Web Server on Linux
Introduction to the 'apache' Web Server
apache Installation
apache Configuration
PHP Configuration
Perl Configuration
Apache Virtual Host Configuration
Web Server Logs
Password Protected Directories
HTTP Firewall
Web Server Check Point
7. FTP
Introduction to vsftpd
FTP Installation
FTP Configuration
FTP Firewall
FTP Access
FTP Logs
FTP Check Point
8. SMTP
Postfix Mail Service Introduction
Postfix Installation
SMTP Configuration
SMTP Logs
SMTP Firewall
Testing & Troubleshooting Email
SMTP Check Point
9. Bonus Section
Additional Items
MySQL Installation & Hardening
Installing Additional Software
SSH Extras
Apache Extras
FTP Extras
Additional Items Check Point
10. Linux Command Line Review
Crucial Linux Commands
11. FAQ

List of Figures

1.1. Rackspace Account
1.2. Rackspace Login
1.3. Rackspace Interface
2.1. Server Design Considerations
2.2. Create a Rackspace Server, Step #1
2.3. Create a Rackspace Server, Step #2
2.4. Create a Rackspace Server, Step #3
2.5. Create a Rackspace Server, Step #4
2.6. Create a Rackspace Server, Step #5
2.7. Create a Rackspace Server, Step #6
2.8. Create a Rackspace Server, Step #7
2.9. Create a Rackspace Server, Step #8
2.10. Reboot the Rackspace VM
2.11. RackSpace Machine Monitoring Overview
2.12. RackSpace Machine Checks
2.13. RackSpace Machine Check Installation
2.14. RackSpace Machine Monitoring
2.15. RackSpace Networking
2.16. RackSpace Machine Create Volume
2.17. RackSpace Machine Volumes
2.18. RackSpace Machine Backup
3.1. Nameserver Configuration
3.2. Configure Rackspace DNS #1
3.3. Configure Rackspace DNS #2
3.4. Configure Rackspace DNS #3
3.5. List of DNS Entries
3.6. Configure Reverse DNS #1
3.7. Configure Reverse DNS #2
3.8. 'dig' DNS Name - Limited Return
3.9. 'dig' DNS Name Servers
3.10. 'dig' DNS Specific Info
3.11. 'dig' DNS CNAME Info
4.1. Machine Update Image #1
4.2. Machine Update Image #2
4.3. Machine Update Image #3
4.4. Machine Update Image #4
4.5. Hostname Configuration Image #1
4.6. Hostname Configuration Image #2
4.7. Adding a User Image #1
4.8. Firewall Configuration Image #1
4.9. Firewall Configuration Image #2
4.10. Firewall Configuration Image #3
4.11. Firewall Configuration TUI
4.12. Installing system-config-firewall-tui
4.13. SELinux Configuration Image #1
5.1. Login via SSH
5.2. PuTTY Home Page
5.3. PuTTY Download
5.4. PuTTY Download 2
5.5. Save the PuTTY Binary
5.6. PuTTY Launch
5.7. PuTTY Login Prompt
5.8. PuTTY Login Success
5.9. Backing Up SSH Config File
5.10. SSH Banner Config Statement
5.11. Edit sshd_config for Banner
5.12. SSH Banner Content
5.13. SSH Daemon Restart
5.14. Presentation of the SSH Banner
5.15. Contents of /var/log
5.16. The 'lastlog' utility
5.17. Reading '/var/log/secure'
5.18. Typical Output of '/var/log/secure'
6.1. apache Installation Image #1
6.2. apache Installation Image #2
6.3. apache Installation Image #3
6.4. apache Installation Image #4
6.5. apache Installation Image #5
6.6. apache Installation Image #6
6.7. apache Installation Image #7
6.8. apache Configuration Image #1
6.9. apache Configuration Image #2
6.10. apache Configuration Image #3
6.11. apache Configuration Image #4
6.12. apache Configuration Image #5
6.13. apache Configuration Image #6
6.14. apache Configuration Image #7
6.15. The 'httpd' Command
6.16. apache Index File
6.17. Simple Web Page Test
6.18. PHP Image #1
6.19. PHP Image #2
6.20. PHP Image #3
6.21. PHP Image #4
6.22. PHP Image #5
6.23. PHP Image #6
6.24. PHP Image #7
6.25. PHP Image #8
6.26. PHP Configuration Read-Out
6.27. PERL Configuration Image #1
6.28. PERL Configuration Image #2
6.29. PERL Configuration Image #3
6.30. PERL Configuration Image #4
6.31. PERL Configuration Image #5
6.32. PERL Configuration Image #6
6.33. PERL Configuration Image #7
6.34. PERL Configuration Image #8
6.35. apache Virtual Host Image #1
6.36. apache Virtual Host Image #2
6.37. apache Virtual Host Image #3
6.38. apache Virtual Host Image #4
6.39. apache Virtual Host Image #5
6.40. apache Virtual Host Image #6
6.41. apache Virtual Host Image #7
6.42. Web Logs Image #1
6.43. Web Logs Image #2
6.44. Web Logs Image #3
6.45. Web Logs Image #4
6.46. Password Protected Directory Image #1
6.47. Password Protected Directory Image #2
6.48. Password Protected Directory Image #3
6.49. Password Protected Directory Image #4
6.50. Password Protected Directory Image #5
6.51. Password Protected Directory Image #6
6.52. Password Protected Directory Image #7
6.53. http Firewall Image #1
6.54. http Firewall Image #2
6.55. http Firewall Image #3
6.56. http Firewall Image #4
6.57. http Firewall Image #5
6.58. http Firewall Image #6
6.59. http Firewall Image #7
7.1. FTP Installation Image #1
7.2. FTP Installation Image #2
7.3. FTP Installation Image #3
7.4. FTP Configuration Image #1
7.5. FTP Configuration Image #2
7.6. FTP Configuration Image #3
7.7. FTP `chkconfig`
7.8. FTP Service Restart
7.9. FTP Firewall Image #1
7.10. FTP Firewall Image #2
7.11. FTP Firewall Image #3
7.12. FTP Firewall Image #4
7.13. FTP Firewall Image #5
7.14. FTP Firewall Image #6
7.15. FTP Access Image #1
8.1. Postfix Configuration Image #1
8.2. Postfix Configuration Image #2
8.3. Postfix Configuration Image #3
8.4. Postfix Configuration Image #4
8.5. Postfix Configuration Image #5
8.6. Postfix Restart
8.7. Postfix MX Record Image #1
8.8. Postfix MX Record Image #2
8.9. Postfix Log Image #1
8.10. Postfix Check Image #4
8.11. Postfix Firewall Image #1
8.12. Postfix Firewall Image #2
8.13. Postfix Firewall Image #3
8.14. Postfix Firewall Image #4
8.15. Postfix Firewall Image #5
8.16. Postfix Firewall Image #6
8.17. Postfix Firewall Image #7
8.18. postfix Check Image #1
8.19. Postfix Check Image #2
9.1. SSH Copy ID
9.2. SSH Key Login
9.3. SSH AllowUsers Config Directive
9.4. SSH No Root Login
9.5. Set sudo Privileges
9.6. Set sudo Commands for 'wheel' Group
9.7. wheel Group Modification
9.8. SSH Key Login with sudo Privileges
9.9. Open SSL Port 443
9.10. HTTPS Browser Certificate Warning
9.11. SSL Certificate Contents
9.12. HTTPS in the Browser