Skip to content

Commit

Permalink
configuration dockerfile apache
Browse files Browse the repository at this point in the history
  • Loading branch information
cdebarros committed Sep 27, 2023
1 parent 7d17d3b commit 8d9e758
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 7 deletions.
9 changes: 9 additions & 0 deletions .docker/apache-ports.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Listen 8080

<IfModule ssl_module>
Listen 443
</IfModule>

<IfModule mod_gnutls.c>
Listen 443
</IfModule>
3 changes: 3 additions & 0 deletions .docker/apache-security.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ServerTokens Prod
ServerSignature Off
TraceEnable Off
18 changes: 18 additions & 0 deletions .docker/apache-vhost.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<VirtualHost *:8080>
ServerName localhost

DocumentRoot /opt/mcstatistic

# Edition de carte statistique
Alias /edition/statistique "/opt/mcstatistic"
<Directory "/opt/mcstatistic">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>

# ErrorLog ${APACHE_LOG_DIR}/macarte_error.log
# CustomLog ${APACHE_LOG_DIR}/macarte_access.log combined
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
18 changes: 11 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
FROM nginxinc/nginx-unprivileged:1.24
ARG registry=docker.io
FROM ${registry}/library/php:8.1-apache

USER root
RUN rm -rf /usr/share/nginx/html/*
USER nginx
# Configuration de apache
COPY .docker/apache-vhost.conf /etc/apache2/sites-available/000-default.conf
COPY .docker/apache-security.conf /etc/apache2/conf-enabled/security.conf
COPY .docker/apache-ports.conf /etc/apache2/ports.conf

COPY ./docs /usr/share/nginx/html
WORKDIR /usr/share/nginx/html
RUN a2enmod rewrite remoteip alias headers

EXPOSE 8080
COPY --chown=www-data:www-data ./docs /opt/mcstatistic/
WORKDIR /opt/mcstatistic

EXPOSE 8080

0 comments on commit 8d9e758

Please sign in to comment.