Skip to content

Commit

Permalink
Fix hardcoded module configs and handle distro specific group
Browse files Browse the repository at this point in the history
  • Loading branch information
dougch committed Jun 13, 2024
1 parent e09b8ff commit 052152a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion nix/shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ function apache2_config(){
export APACHE2_INSTALL_DIR=/usr/local/apache2
export APACHE_SERVER_ROOT="$APACHE2_INSTALL_DIR"
export APACHE_RUN_USER=nobody
export APACHE_RUN_GROUP=nogroup
# Unprilidged groupname differs
export APACHE_RUN_GROUP=$(awk 'BEGIN{FS=":"} /65534/{print $1}' /etc/group)
export APACHE_PID_FILE="${APACHE2_INSTALL_DIR}/run/apache2.pid"
export APACHE_RUN_DIR="${APACHE2_INSTALL_DIR}/run"
export APACHE_LOCK_DIR="${APACHE2_INSTALL_DIR}/lock"
Expand All @@ -178,6 +179,7 @@ function apache2_start(){
mkdir -p $APACHE2_INSTALL_DIR
# NixOs specific base apache config
cp -R ./tests/integrationv2/apache2/nix/* $APACHE2_INSTALL_DIR
# Integrationv2::cross_compatibility site
cp -R ./codebuild/bin/apache2/{www,sites-enabled} $APACHE2_INSTALL_DIR
fi
httpd -k start -f "${APACHE2_INSTALL_DIR}/apache2.conf"
Expand Down
4 changes: 2 additions & 2 deletions tests/integrationv2/apache2/nix/mods-enabled/alias.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# We include the /icons/ alias for FancyIndexed directory listings. If
# you do not use FancyIndexing, you may comment this out.

Alias /icons/ "/usr/share/apache2/icons/"
Alias /icons/ "${APACHE_NIX_STORE}/usr/share/apache2/icons/"

<Directory "/usr/share/apache2/icons">
<Directory "${APACHE_NIX_STORE}/icons">
Options FollowSymlinks
AllowOverride None
Require all granted
Expand Down
2 changes: 1 addition & 1 deletion tests/integrationv2/apache2/nix/mods-enabled/mime.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig /etc/mime.types
TypesConfig ${APACHE_NIX_STORE}/conf/mime.types

#
# AddType allows you to add to or override the MIME configuration
Expand Down
2 changes: 1 addition & 1 deletion tests/integrationv2/apache2/nix/mods-enabled/ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# Configure the pass phrase gathering process.
# The filtering dialog program (`builtin' is a internal
# terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog exec:/usr/share/apache2/ask-for-passphrase
#SSLPassPhraseDialog exec:/usr/share/apache2/ask-for-passphrase

# Inter-Process Session Cache:
# Configure the SSL Session Cache: First the mechanism
Expand Down

0 comments on commit 052152a

Please sign in to comment.