fix : migration apache vers nginx pour un déploiement plus simple

This commit is contained in:
2026-01-21 19:14:54 +01:00
parent 6c1f14ae4d
commit 44bff2a4e5
9 changed files with 109 additions and 125 deletions

View File

@@ -1,6 +1,6 @@
ARG DOCKER_PHP_VERSION
FROM php:${DOCKER_PHP_VERSION}-apache-bullseye
FROM php:${DOCKER_PHP_VERSION}-fpm-bullseye
ARG DOCKER_NODE_VERSION
ENV DOCKER_NODE_VERSION="${DOCKER_NODE_VERSION}"
@@ -105,10 +105,6 @@ RUN rm -rf /var/cache/apk/* && rm -rf /tmp/* && \
# Création de la structure du projet
RUN mkdir /var/www/html/LOG
# Activation du module pour Apache2 proxy_http et rewrite
RUN a2enmod proxy_http && \
a2enmod rewrite
###> User ###
ARG CURRENT_UID
ARG CURRENT_GID

View File

@@ -1,32 +0,0 @@
<VirtualHost *:80>
DocumentRoot /var/www/html
AliasMatch "^/api(/.*)?" "/var/www/html/public$1"
<Directory /var/www/html/public>
Options FollowSymLinks
AllowOverride All
Require all granted
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /api/index.php [L]
</Directory>
AliasMatch "^/(?!api)(.*)$" "/var/www/html/frontend/dist/$1"
<Directory /var/www/html/frontend/dist>
AllowOverride All
Order allow,deny
Allow from All
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^ index.html [L]
</Directory>
ErrorLog "${APACHE_LOG_DIR}/error.log"
CustomLog "${APACHE_LOG_DIR}/access.log" combined
</VirtualHost>