diff --git a/Apache+PHP/compose.yaml b/Apache+PHP/compose.yaml new file mode 100644 index 0000000..2eeafb1 --- /dev/null +++ b/Apache+PHP/compose.yaml @@ -0,0 +1,19 @@ +services: + apache: + image: httpd:2.4 + container_name: apache2.4 + command: > + sh -c "echo 'Include conf/extra/vhost.conf' >> /usr/local/apache2/conf/httpd.conf && httpd-foreground" + ports: + - "51180:80" + volumes: + - ./vhost.conf:/usr/local/apache2/conf/extra/vhost.conf + - ./html:/var/www/html + depends_on: + - php + + php: + image: php:8.2-fpm + container_name: php8.2 + volumes: + - ./html:/var/www/html diff --git a/Apache+PHP/index.php b/Apache+PHP/index.php new file mode 100644 index 0000000..bfd863b --- /dev/null +++ b/Apache+PHP/index.php @@ -0,0 +1,2 @@ + + DocumentRoot /var/www/html + DirectoryIndex index.php + + + AllowOverride All + Require all granted + + + # Transmet les requêtes .php au conteneur "php" sur le port 9000 + ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://php:9000/var/www/html/$1 +