Skip to content

Commit c423b54

Browse files
committed
feat(apache): add apache Dockerfile to enable mod_status module
1 parent d64592d commit c423b54

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Use an official Apache image
2+
FROM httpd:latest
3+
4+
# Enable mod_status module
5+
RUN sed -i '/LoadModule status_module/s/^#//g' /usr/local/apache2/conf/httpd.conf
6+
7+
# Add mod_status configuration
8+
RUN echo "\
9+
<Location /server-status>\n\
10+
SetHandler server-status\n\
11+
Require local\n\
12+
Require ip 192.168.1.5\n\
13+
</Location>\n\
14+
ExtendedStatus On\n" >> /usr/local/apache2/conf/httpd.conf
15+
16+
# Expose port 80
17+
EXPOSE 80

0 commit comments

Comments
 (0)