Professional Documents
Culture Documents
Lesson 9 - Offering Web Services
Lesson 9 - Offering Web Services
2
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
1 What is a Web server
4
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Basic HTTP session
5
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Client requests
6
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Server responses
Status code categories:
7
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Secure HTTPS session
8
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Linux web servers
9
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
2 The Apache Web server
Ubuntu CentOS 11
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Manage Apache web server – apache2ctl utility
12
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Configure Apache web server
13
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Common Apache configuration directives
14
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Apache logs
Debian based:
/var/log/apache2/error.log
Error logs
RH based:
/var/log/httpd/error_log
Debian based:
/var/log/apache2/access.log
Access logs
RH based:
/var/log/httpd/access_log
15
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
User web hosting
Add the UserDir directive to the global configuration settings
16
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Virtual web hosting
There are two ways to implement virtual web hosting in Apache:
18
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Access restriction
Using mod_auth method Using mod_access method
19
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Hosting Dynamic Web Applications
The Common Gateway Interface
20
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Hosting Dynamic Web Applications
The Programming modules
21
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Creating a Secure Web Server
Steps to creating HTTPS server
22
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Creating a Secure Web Server
Install SSL
23
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Creating a Secure Web Server
Create an Encryption Key
24
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Creating a Secure Web Server
Create a Certificate Signing Request
25
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Creating a Secure Web Server
Sign the CSR
26
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Creating a Secure Web Server
27
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Creating a Secure Web Server
28
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Creating a Secure Web Server
Additional SSL directives
29
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Creating a Secure Web Server
Connect to the HTTPS server with self-sign certificate
30
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
3 Using a proxy server
32
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Config Squid
Configuration file
33
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Config Squid – Web cache
http_port
• The http_port directive defines the TCP port to which
clients must point their browsers
cache_dir
• The cache_dir directive defines where and how Squid will
store the cached web files
34
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Config Squid – Web access control
Define an ACL by using the acl directive Define rule to apply to ACL by using
http_access directive
ACL types
35
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Config Squid – Client authentication
1. Define authentication method by using the auth_param directive
2. Apply to ACL
36
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Config Squid – Configure client
37
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
4 The Nginx Server
39
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
Configuring Nginx
Configuration file: /etc/nginx/nginx.conf
40
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com
THANKS!
ANY QUESTIONS?
41
This document is created by Nguyen Hoang Chi chi.nguyen.e4w@gmail.com