Skip to content

Commit 23032f3

Browse files
committed
add Playground server to test some vulnerabilities
1 parent 9763fb4 commit 23032f3

File tree

4 files changed

+51
-0
lines changed

4 files changed

+51
-0
lines changed

_Playground/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Utiliser une image PHP avec Apache préinstallé
2+
FROM php:8.1-apache
3+
4+
# Copier les fichiers du projet dans le répertoire approprié du conteneur
5+
COPY src/ /var/www/html/
6+
7+
# Activer le module rewrite d'Apache
8+
RUN a2enmod rewrite
9+
10+
# Exposer le port 80 pour accéder à l'application via HTTP
11+
EXPOSE 80
12+
13+
# Lancer Apache lorsque le conteneur démarre
14+
CMD ["apache2-foreground"]

_Playground/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# PHP Playground server
2+
3+
The server run on port 9999. It is a simple PHP server that can be used to test various vulnerabilities.
4+
5+
To launch the server, run:
6+
7+
```
8+
docker compose up --build
9+
```
10+
or
11+
```
12+
docker-compose up --build
13+
```

_Playground/docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '3.8'
2+
3+
services:
4+
web:
5+
container_name: playground
6+
build: .
7+
ports:
8+
- "9999:80"
9+
volumes:
10+
- ./src:/var/www/html

_Playground/src/index.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
?>
4+
5+
<!DOCTYPE html>
6+
<html lang="fr">
7+
<head>
8+
<meta charset="UTF-8">
9+
<title>Playground</title>
10+
</head>
11+
<body>
12+
<h1>Hello World</h1>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)