Removed .cgi extension

master
Keith Irwin 2022-11-06 18:13:52 -07:00
parent 889b82c3f7
commit 9b54b6f6fa
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
2 changed files with 6 additions and 7 deletions

View File

@ -10,10 +10,9 @@ RUN apt-get update && apt-get install --yes \
&& rm -rf /var/lib/apt/lists/*
# Create dirs and temp files
RUN mkdir /var/www/cgi-bin/ /usr/lib/wgapi /var/log/wgapi
RUN mkdir /usr/lib/wgapi /var/log/wgapi
RUN touch /var/local/wgapi_tokens /var/log/wgapi/wgapi.log
RUN chown -R www-data:www-data /var/www/cgi-bin/ /usr/lib/wgapi \
/var/log/wgapi /var/local/wgapi_tokens
RUN chown -R www-data:www-data /usr/lib/wgapi /var/log/wgapi /var/local/wgapi_tokens
# Configure apache
RUN a2enmod cgi rewrite
@ -23,7 +22,7 @@ RUN sed -i "s/^<VirtualHost \*:80>$/<VirtualHost *:${LISTEN_PORT}>/" \
/etc/apache2/sites-available/000-default.conf
RUN sed -i "s/ServerAdmin .*$/ServerAdmin ${ADMIN_EMAIL}/" \
/etc/apache2/sites-available/000-default.conf
RUN sed -i "s|DocumentRoot .*$|DocumentRoot /var/www/cgi-bin\n\tScriptAlias /peer /var/www/cgi-bin/peer.cgi\n\tScriptAlias /user /var/www/cgi-bin/user.cgi|" \
RUN sed -i "s|DocumentRoot .*$|DocumentRoot /var/www\n\tScriptAlias / /usr/lib/cgi-bin/|" \
/etc/apache2/sites-available/000-default.conf
# Allow http to run these binaries as root with sudo
@ -31,8 +30,8 @@ RUN echo "www-data ALL=(ALL:ALL) NOPASSWD: /usr/bin/wg, /usr/bin/openssl, /usr/b
| sudo EDITOR='tee -a' visudo
# Copy over CGIs and libs
COPY admin_peer.cgi /var/www/cgi-bin/peer.cgi
COPY admin_user.cgi /var/www/cgi-bin/user.cgi
COPY admin_peer.cgi /usr/lib/cgi-bin/peer.cgi
COPY admin_user.cgi /usr/lib/cgi-bin/user.cgi
# TODO: Copy only needed libs
COPY lib/ /usr/lib/wgapi/

View File

@ -31,7 +31,7 @@ RUN echo "www-data ALL=(ALL:ALL) NOPASSWD: /usr/bin/wg, /usr/bin/openssl, /usr/b
# Copy over cgi and libs
COPY dashboard.cgi /usr/lib/cgi-bin/index.cgi
COPY dashboard_ssl.cgi /usr/lib/cgi-bin/ssl.cgi
COPY dashboard_ssl.cgi /usr/lib/cgi-bin/ssl
# TODO: Copy only needed libs
COPY lib/ /usr/lib/wgapi/