Skip to content

Commit a21ddb7

Browse files
author
Julien Neuhart
committed
fixing htaccess not used
1 parent 5914942 commit a21ddb7

File tree

4 files changed

+44
-12
lines changed

4 files changed

+44
-12
lines changed

Dockerfile.10-apache

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ RUN set -ex \
7979
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
8080
done
8181

82-
# Apache + PHP requires preforking Apache for best results
83-
RUN a2dismod mpm_event && a2enmod mpm_prefork
84-
8582
# logs should go to stdout / stderr
8683
RUN set -ex \
8784
&& . "$APACHE_ENVVARS" \
@@ -94,6 +91,17 @@ ENV APACHE_DOCUMENT_ROOT /
9491
RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
9592
RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
9693

94+
RUN { \
95+
echo 'DirectoryIndex disabled'; \
96+
echo 'DirectoryIndex index.html'; \
97+
echo; \
98+
echo '<Directory /var/www/>'; \
99+
echo '\tOptions -Indexes'; \
100+
echo '\tAllowOverride All'; \
101+
echo '</Directory>'; \
102+
} | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \
103+
&& a2enconf nodejs
104+
97105
# |--------------------------------------------------------------------------
98106
# | Apache mod_rewrite
99107
# |--------------------------------------------------------------------------

Dockerfile.6-apache

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ RUN set -ex \
7979
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
8080
done
8181

82-
# Apache + PHP requires preforking Apache for best results
83-
RUN a2dismod mpm_event && a2enmod mpm_prefork
84-
8582
# logs should go to stdout / stderr
8683
RUN set -ex \
8784
&& . "$APACHE_ENVVARS" \
@@ -94,6 +91,17 @@ ENV APACHE_DOCUMENT_ROOT /
9491
RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
9592
RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
9693

94+
RUN { \
95+
echo 'DirectoryIndex disabled'; \
96+
echo 'DirectoryIndex index.html'; \
97+
echo; \
98+
echo '<Directory /var/www/>'; \
99+
echo '\tOptions -Indexes'; \
100+
echo '\tAllowOverride All'; \
101+
echo '</Directory>'; \
102+
} | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \
103+
&& a2enconf nodejs
104+
97105
# |--------------------------------------------------------------------------
98106
# | Apache mod_rewrite
99107
# |--------------------------------------------------------------------------

Dockerfile.8-apache

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ RUN set -ex \
7979
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
8080
done
8181

82-
# Apache + PHP requires preforking Apache for best results
83-
RUN a2dismod mpm_event && a2enmod mpm_prefork
84-
8582
# logs should go to stdout / stderr
8683
RUN set -ex \
8784
&& . "$APACHE_ENVVARS" \
@@ -94,6 +91,17 @@ ENV APACHE_DOCUMENT_ROOT /
9491
RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
9592
RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
9693

94+
RUN { \
95+
echo 'DirectoryIndex disabled'; \
96+
echo 'DirectoryIndex index.html'; \
97+
echo; \
98+
echo '<Directory /var/www/>'; \
99+
echo '\tOptions -Indexes'; \
100+
echo '\tAllowOverride All'; \
101+
echo '</Directory>'; \
102+
} | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \
103+
&& a2enconf nodejs
104+
97105
# |--------------------------------------------------------------------------
98106
# | Apache mod_rewrite
99107
# |--------------------------------------------------------------------------

utils/Dockerfile.blueprint

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ RUN set -ex \
8282
&& chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
8383
done
8484

85-
# Apache + PHP requires preforking Apache for best results
86-
RUN a2dismod mpm_event && a2enmod mpm_prefork
87-
8885
# logs should go to stdout / stderr
8986
RUN set -ex \
9087
&& . "$APACHE_ENVVARS" \
@@ -97,6 +94,17 @@ ENV APACHE_DOCUMENT_ROOT /
9794
RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
9895
RUN sed -ri -e 's!/var/www/!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
9996

97+
RUN { \
98+
echo 'DirectoryIndex disabled'; \
99+
echo 'DirectoryIndex index.html'; \
100+
echo; \
101+
echo '<Directory /var/www/>'; \
102+
echo '\tOptions -Indexes'; \
103+
echo '\tAllowOverride All'; \
104+
echo '</Directory>'; \
105+
} | tee "$APACHE_CONFDIR/conf-available/nodejs.conf" \
106+
&& a2enconf nodejs
107+
100108
# |--------------------------------------------------------------------------
101109
# | Apache mod_rewrite
102110
# |--------------------------------------------------------------------------

0 commit comments

Comments
 (0)