Husni Chapter19 Web Server Administration
Husni Chapter19 Web Server Administration
Administration
Husni
Husni.trunojoyo.ac.id
5 Web Monitoring
and Analytics
2
Section 1 of 5
WEB SERVER HOSTING OPTIONS
3
Hosting
Development vs Production
5
Shared Hosting
Cost effective Hosting
6
Shared Hosting
Sharing is ok
7
Simple Shared Hosting
The Cheapest
8
Virtualized Shared Hosting
Better, but still cost effective
9
Dedicated Hosting
Almost your machine
10
Dedicated Hosting
Almost your machine
13
Cloud Hosting
Ignore the man behind the curtain
16
Registering a Domain Name
Step one to your fortune
17
Registering a Domain Name
WHOIS
18
Whois
A Visualization
19
Whois
Private Visualization
20
Whois
Private Visualization
21
Updating the Name Servers
Easy to use, a little tricky to update
22
Checking Name Servers
Some little tricks
23
Checking Name Servers
Dig it
24
DNS Record Types
Host, Mail Server, Name Server, Alias, …
26
DNS Record Types
A and AAAA Records
27
DNS Record Types
CNAME Records
29
DNS Record Types
Mail Records
Mail Exchange (MX) records are the records that provide the
location of the Simple Mail Transfer Protocol (SMTP) servers
to receive email for this domain.
SMTP allows redundant mail servers for load distribution or
backup purposes. To support that feature, MX records not
only require an IP address but also a ranking.
When trying to deliver mail, the lowest numbered servers
are tried first, and only if they are down, will the higher ones
be used.
ranking 30
DNS Record Types
Authoritative Records
32
DNS Record Types
Validation Records
34
Reverse DNS
in-addr.apra
36
Apache
The world’s most popular webserver
37
Apache
Configuration
40
Run Levels
Linux Runlevels
Linux defines multiple “levels” in which the operating system can run,
which correspond to different levels of service. Although the details
vary between distributions they are generally considered to be:
0. Halt (shut down)
1. Single-user mode
2. Multiuser mode, no networking
3. Multiuser mode with networking
4. Unused
5. Multiuser mode with networking and GUI (Windows)
6. Reboot
41
Run Levels
Linux Runlevels
44
Connection Management
Fine tuning your server
45
Connection Management
Fine tuning your server
50
Encryption and SSL
Certificate Signing
51
Encryption and SSL
Apache configuration details
53
File Ownership and Permissions
Security risk
56
Managing Multiple Domains
VirtualHost Directive
57
Managing Multiple Domains
VirtualHost Visualization
58
Handling Directory Requests
The index files
59
Handling Directory Requests
What to serve?
60
Handling Directory Requests
What to serve?
61
Handling Directory Requests
How did it come to pass that we use index.php
65
Public Redirection
66
Public Redirection
Two requests required, and everybody knows
67
Public Redirection
There are Apache Directives
68
Public Redirection
The RedirectRule Directive
69
Internal Redirection
One fewer requests
70
Internal Redirection
One fewer requests
71
Conditional ReWriting
Internal or Public
73
Conditional ReWriting
An advanced example
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www\.)? funwebdev\.com/.*$ [NC]
RewriteRule \.(jpg|gif|bmp|png)$ - [F]
F - Forbidden
To return a small static image for all invalid requests use the
following directives:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www\.)?funwebdev\.com/.*$ [NC]
RewriteRule \.(jpg|gif|bmp|png)$ http://funwebdev.com/stopIt.png
74
Managing Access with .htaccess
Should have done his a long time ago (maybe you did)
75
Managing Access with .htaccess
Add a file to the folder and point to a password file
76
Server Caching
Another Cache
78
Server Caching
Directives – in brief
CacheRoot /fastdisk/cache/
• CacheDefaultExpire determines how long in seconds something
in cache is stored before the cached copy expires. 79
Section 5 of 5
WEB MONITORING AND ANALYTICS
80
Monitoring
Internal and External
81
Internal Monitoring
Apache Logging
82
Internal Monitoring
Log rotation
83
External Monitoring
Test the network
84
Internal Analytics
Build on your logs
85
Third-Party Analytics
Put in a little piece of JavaScript
86
Third-Party Support Tools
Let us help
87
Third-Party Support Tools
Screenshot of Google’s Webmaster Tools
88
What You’ve Learned
5 Web Monitoring
and Analytics
89