Skip to content

Commit

Permalink
Making sure the default vhost also logs to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
danakim authored and quartje committed Nov 6, 2023
1 parent ae79cb7 commit a8af825
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions apache2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ RUN a2enmod authz_groupfile \
# Copy the default apache config
COPY ./conf/apache2.conf /etc/apache2/apache2.conf
COPY ./conf/security.conf /etc/apache2/conf-available/security.conf
COPY ./conf/default-vhost.conf /etc/apache2/sites-available/000-default.conf

# Copy the startup script
COPY ./bin/start.sh /usr/local/bin/start.sh
Expand Down
34 changes: 34 additions & 0 deletions apache2/conf/default-vhost.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

#ErrorLog ${APACHE_LOG_DIR}/error.log
#CustomLog ${APACHE_LOG_DIR}/access.log combined

ErrorLog /proc/self/fd/2
CustomLog /proc/self/fd/1 common

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

0 comments on commit a8af825

Please sign in to comment.