nginx grundkonfiguration

This commit is contained in:
mrwacka 2026-09-05 16:56:28 +02:00
parent 6d8a33dcda
commit 4dea5997f6
6 changed files with 69 additions and 2 deletions

View file

@ -1 +0,0 @@
test 2asdfasdfasdfasdf

View file

@ -1 +0,0 @@
hier kommt nginxasdfasdf

32
nginx/README.md Normal file
View file

@ -0,0 +1,32 @@
# infra-int01
Basis-Setup fuer den internen nginx auf `infra-int01`.
## Ziel
Diese Instanz dient als schlanker interner nginx auf `infra-int01`.
Der erste Stand liefert nur eine statische Testseite aus.
Reverse-Proxy-Eintraege werden spaeter separat ergaenzt.
## Struktur
```text
infra-int01/
├── compose.yaml
├── README.md
├── nginx/
│ ├── conf.d/
│ │ └── default.conf
│ ├── html/
│ │ └── index.html
│ └── proxy/
│ └── README.md
Voraussetzungen
Auf infra-int01 muessen vorhanden sein:
Docker
Docker Compose Plugin
geklontes Repo unter /srv/infra-int01/repo/infra-int01

15
nginx/compose.yaml Normal file
View file

@ -0,0 +1,15 @@
services:
nginx:
image: nginx:alpine
container_name: nginx
restart: unless-stopped
ports:
- "80:80"
volumes:
- /srv/infra-int01/repo/infra-int01/nginx/conf.d:/etc/nginx/conf.d:ro
- /srv/infra-int01/repo/infra-int01/nginx/html:/usr/share/nginx/html:ro
healthcheck:
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1/ || exit 1"]
interval: 30s
timeout: 5s
retries: 3

12
nginx/conf.d/default.conf Normal file
View file

@ -0,0 +1,12 @@
server {
listen 80 default_server;
server_name _;
access_log /dev/stdout;
error_log /dev/stderr warn;
location / {
root /usr/share/nginx/html;
index index.html;
}
}

10
nginx/html/index.html Normal file
View file

@ -0,0 +1,10 @@
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>infra-int01 nginx</title>
</head>
<body>
<h1>nginx auf infra-int01 läuft</h1>
</body>
</html>