Skip to content
Snippets Groups Projects
Commit f4aea37d authored by timbastin's avatar timbastin
Browse files

Finished ex1

parent 5eb247e8
No related branches found
No related tags found
No related merge requests found
# Aufgabe 1
## b)
> Frage: Warum ist es in vielen Fällen sinnvoll, den Zugriff auf Webserver mittels IP-Adresse zu blockieren?
Da Menschen normalerweise nicht über die IP-Adresse auf einen Server zugreifen. Möglicherweise handelt es sich um einen Hacker, der böses im Sinn hat.
......@@ -7,8 +7,7 @@ services:
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./static:/www/data
ports:
- "80:80"
networks:
my_ipv6:
ipv6_address: 2001:638:408:200:fe10:cafe::7777
......@@ -17,4 +16,7 @@ services:
networks:
my_ipv6:
external:
name: my_ipv6
\ No newline at end of file
name: my_ipv6
loc_ipv6:
external:
name: loc_ipv6
\ No newline at end of file
# events is necessary - otherwise the server wont start
events {
worker_connections 1024;
}
......@@ -6,12 +7,34 @@ http {
sendfile on;
server {
# listen on port 80 and 443 for ipv4 and ipv6 requests
listen 80;
listen [::]:80;
listen 443;
listen [::]:443;
# if the requested hostname does match one of the following, check the location block.
server_name localhost tbasti2s.l3montree.com tbasti2s.l3montree.education;
location / {
# always return static files
root /www/data;
}
gzip_static on;
}
server {
# listen on port 80 and 443 for ipv4 and ipv6 requests
listen 80;
listen [::]:80;
listen 443;
listen [::]:443;
# there is no server name provided here - match anything else
location / {
# return the error index.html
root /www/data/error;
}
}
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<title>Service Management tbasti2s</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
</head>
<body>
<div class="jumbotron text-center">
<h1>Service Management tbasti2s</h1>
</div>
<div class="container">
<div class="row">
<div>
<p>
444
Undefined Server Name
Access via IP address? Access only allowed via URL.
</p>
</div>
</div>
</div>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment