File tree Expand file tree Collapse file tree 4 files changed +44
-12
lines changed Expand file tree Collapse file tree 4 files changed +44
-12
lines changed Original file line number Diff line number Diff 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
8683RUN set -ex \
8784 && . "$APACHE_ENVVARS" \
@@ -94,6 +91,17 @@ ENV APACHE_DOCUMENT_ROOT /
9491RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
9592RUN 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# |--------------------------------------------------------------------------
Original file line number Diff line number Diff 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
8683RUN set -ex \
8784 && . "$APACHE_ENVVARS" \
@@ -94,6 +91,17 @@ ENV APACHE_DOCUMENT_ROOT /
9491RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
9592RUN 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# |--------------------------------------------------------------------------
Original file line number Diff line number Diff 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
8683RUN set -ex \
8784 && . "$APACHE_ENVVARS" \
@@ -94,6 +91,17 @@ ENV APACHE_DOCUMENT_ROOT /
9491RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
9592RUN 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# |--------------------------------------------------------------------------
Original file line number Diff line number Diff 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
8986RUN set -ex \
9087 && . "$APACHE_ENVVARS" \
@@ -97,6 +94,17 @@ ENV APACHE_DOCUMENT_ROOT /
9794RUN sed -ri -e 's!/var/www/html!/var/www/html/${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
9895RUN 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# |--------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments