Fixed DocumentRoot

master
Keith Irwin 2022-11-07 11:24:13 -07:00
parent 5f3de537a5
commit 30217df42a
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
2 changed files with 2 additions and 4 deletions

View File

@ -19,10 +19,9 @@ RUN chown -R www-data:www-data /usr/lib/wgapi /var/log/wgapi /var/local/wgapi_to
RUN a2enmod cgi rewrite
RUN sed -i "s/^Listen 80$/Listen ${LISTEN_PORT}/" /etc/apache2/ports.conf
RUN sed -i -e "s/^<VirtualHost \*:80>$/<VirtualHost *:${LISTEN_PORT}>/" \
-e "s|DocumentRoot .*$|DocumentRoot /usr/lib/cgi-bin/|" \
-e "s|DocumentRoot .*$|DocumentRoot /usr/lib/cgi-bin\n\tSetHandler cgi-script\n\tOptions +ExecCGI|" \
-e "s/ServerAdmin .*$/ServerAdmin ${ADMIN_EMAIL}/" \
-e "s/#ServerName .*$/ServerName ${SERVER_NAME}/" \
-e 's|#Include conf-available/serve-cgi-bin.conf|Include conf-available/serve-cgi-bin.conf|' \
/etc/apache2/sites-available/000-default.conf
# Allow http user to run these binaries as root with sudo

View File

@ -20,10 +20,9 @@ RUN a2enmod cgi rewrite
RUN sed -i "s/^Listen 80$/Listen ${LISTEN_PORT}/" \
/etc/apache2/ports.conf
RUN sed -i -e "s/^<VirtualHost \*:80>$/<VirtualHost *:${LISTEN_PORT}>/" \
-e "s|DocumentRoot .*$|DocumentRoot /usr/lib/cgi-bin/|" \
-e "s|DocumentRoot .*$|DocumentRoot /usr/lib/cgi-bin\n\tSetHandler cgi-script\n\tOptions +ExecCGI|" \
-e "s/ServerAdmin .*$/ServerAdmin ${ADMIN_EMAIL}/" \
-e "s/#ServerName .*$/ServerName ${SERVER_NAME}/" \
-e 's|#Include conf-available/serve-cgi-bin.conf|Include conf-available/serve-cgi-bin.conf|' \
/etc/apache2/sites-available/000-default.conf
# Allow http user to run these binaries as root with sudo