Commit 5320fc87 authored by Davide Depau's avatar Davide Depau

Translate and update part of the slides

parent 4386c49d
Pipeline #553 passed with stage
in 1 minute and 15 seconds
......@@ -4,10 +4,11 @@ You can find the slides here:
----
## Argomenti
## Topics
- Cos'è un web server
- Configurazione
- What is a web server?
- What is a reverse proxy?
- Configuration
- HTTPS
---
......@@ -16,10 +17,10 @@ You can find the slides here:
----
## Cos'è un web server
## What is a web server?
- Software che processa richieste HTTP
- Serve contenuti e pagine web a browser e altri client
- It's a software that handles HTTP requests
- It serves web pages and data to browsers and other clients
----
......@@ -28,70 +29,61 @@ You can find the slides here:
Hypertext Transfer Protocol
- Request-response protocol
- Il client manda una richiesta
- Il server restituisce una risposta
- Client sends requests
- Server replies
- La risposta contiene il contenuto richiesto ed informazioni sullo stato
- The response will contain the requested content and other status info
----
## HTTP Request Message
Una richiesta HTTP è composta da 3 parti:
An HTTP request is made of 3 parts:
- Un metodo ed un'URI
- A request method and a URI (Universal Resource Identifier)
```
(GET | POST | PUT | DELETE| ...) /index.html
```
- Zero o più header (host, cookie, user-agent...)
- Opzionalmente un corpo del messaggio
- Utile per upload o form
- Zero or more headers (host name, cookies, user-agent...)
- Optionally a message body
- Useful to upload files or forms
----
## HTTP Response Message
Come le richieste, al posto del metodo si ha un codice di stato
Similar, but instead of the method we get a status code
- **1xx: Informational** - richiesta ricevuta (bene)
- **2xx: Success** - richiesta ricevuta, compresa e accettata (bene)
- **3xx: Redirection** - verranno intraprese altre azioni per completare la
richiesta (bene)
- **4xx: Client Error** - la richiesta è malformata e non può essere completata
(male)
- **5xx: Server Error** - il server non è riuscito a soddifare una richiesta
apparentemente valida (peggio)
- **1xx: Informational** - Request received, will continue
- **2xx: Success** - Request received, understood and accepted
- **3xx: Redirection** - Further action is required to complete the request
- **4xx: Client Error** - The request can't be fulfilled due to client issues
- **5xx: Server Error** - The server failed to fulfill a potentially valid request
----
## Demo
```
telnet www.poul.org 80
telnet poul.org 80
Trying 176.31.102.216...
Connected to poul.org.
Escape character is '^]'.
GET / HTTP/1.1
Host: www.poul.org
Host: poul.org
```
```
HTTP/1.1 301 Moved Permanently
Server: nginx/1.4.6 (Ubuntu)
Date: Sat, 07 Apr 2018 14:22:04 GMT
Content-Type: text/html
Content-Length: 193
Connection: keep-alive
Location: https://www.poul.org/
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html>
Connection: close
Content-Type: text/html; charset=utf-8
Location: https://poul.org/
Server: Caddy
Date: Sat, 11 Apr 2020 02:42:20 GMT
Content-Length: 52
<a href="https://poul.org/">Moved Permanently</a>.
```
----
......@@ -99,26 +91,15 @@ Location: https://www.poul.org/
## Demo
```
curl www.poul.org
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html>
curl poul.org
<a href="https://poul.org/">Moved Permanently</a>.
```
```
curl -L www.poul.org
<html lang="en-US">
<head profile="http://gmpg.org/xfn/11">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title>POuL &#187; Politecnico Open unix Labs</title>
curl -L poul.org
<!DOCTYPE html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" <![endif]-->
...
```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment