Skip to content

Commit e6c9122

Browse files
committed
Work with .htaccess
1 parent 1d049b3 commit e6c9122

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

5.6/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ RUN a2enmod \
158158
status \
159159
ssl
160160

161+
# without the following line we get "AH00558: apache2: Could not reliably determine the server's fully qualified domain name"
162+
# autorise .htaccess files
163+
RUN \
164+
echo "ServerName localhost" >> /etc/apache2/apache2.conf; \
165+
sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
166+
161167
# Install composer (latest version) | prestissimo to speed up composer
162168
RUN curl -sS https://getcomposer.org/installer | php && \
163169
mv composer.phar /usr/local/bin/composer && \

7.0/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ RUN a2enmod \
171171
status \
172172
ssl
173173

174+
# without the following line we get "AH00558: apache2: Could not reliably determine the server's fully qualified domain name"
175+
# autorise .htaccess files
176+
RUN \
177+
echo "ServerName localhost" >> /etc/apache2/apache2.conf; \
178+
sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
179+
174180
# Install composer (latest version) | prestissimo to speed up composer
175181
RUN curl -sS https://getcomposer.org/installer | php && \
176182
mv composer.phar /usr/local/bin/composer && \

7.1/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ RUN a2enmod \
172172
status \
173173
ssl
174174

175+
# without the following line we get "AH00558: apache2: Could not reliably determine the server's fully qualified domain name"
176+
# autorise .htaccess files
177+
RUN \
178+
echo "ServerName localhost" >> /etc/apache2/apache2.conf; \
179+
sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
180+
175181
# Install composer (latest version) | prestissimo to speed up composer
176182
RUN curl -sS https://getcomposer.org/installer | php && \
177183
mv composer.phar /usr/local/bin/composer && \

7.2/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ RUN a2enmod \
184184
status \
185185
ssl
186186

187+
# without the following line we get "AH00558: apache2: Could not reliably determine the server's fully qualified domain name"
188+
# autorise .htaccess files
189+
RUN \
190+
echo "ServerName localhost" >> /etc/apache2/apache2.conf; \
191+
sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
192+
187193
# Install composer (latest version) | prestissimo to speed up composer
188194
RUN curl -sS https://getcomposer.org/installer | php && \
189195
mv composer.phar /usr/local/bin/composer && \

7.3/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ RUN a2enmod \
183183
status \
184184
ssl
185185

186+
# without the following line we get "AH00558: apache2: Could not reliably determine the server's fully qualified domain name"
187+
# autorise .htaccess files
188+
RUN \
189+
echo "ServerName localhost" >> /etc/apache2/apache2.conf; \
190+
sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
191+
186192
# Install composer (latest version) | prestissimo to speed up composer
187193
RUN curl -sS https://getcomposer.org/installer | php && \
188194
mv composer.phar /usr/local/bin/composer && \

0 commit comments

Comments
 (0)