Try to fix cgi
parent
c0228578b3
commit
dd86b8436e
|
@ -10,10 +10,9 @@ RUN apt-get update && apt-get install --yes \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Create dirs and temp files
|
# 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 touch /var/local/wgapi_tokens /var/log/wgapi/wgapi.log
|
||||||
RUN chown -R www-data:www-data /var/www/cgi-bin/ /usr/lib/wgapi \
|
RUN chown -R www-data:www-data /usr/lib/wgapi /var/log/wgapi /var/local/wgapi_tokens
|
||||||
/var/log/wgapi /var/local/wgapi_tokens
|
|
||||||
|
|
||||||
# Configure apache
|
# Configure apache
|
||||||
RUN a2enmod cgi rewrite
|
RUN a2enmod cgi rewrite
|
||||||
|
@ -23,7 +22,7 @@ RUN sed -i "s/^<VirtualHost \*:80>$/<VirtualHost *:${LISTEN_PORT}>/" \
|
||||||
/etc/apache2/sites-available/000-default.conf
|
/etc/apache2/sites-available/000-default.conf
|
||||||
RUN sed -i "s/ServerAdmin .*$/ServerAdmin ${ADMIN_EMAIL}/" \
|
RUN sed -i "s/ServerAdmin .*$/ServerAdmin ${ADMIN_EMAIL}/" \
|
||||||
/etc/apache2/sites-available/000-default.conf
|
/etc/apache2/sites-available/000-default.conf
|
||||||
RUN sed -i "s|DocumentRoot .*$|DocumentRoot /var/www/cgi-bin\n\tScriptAlias / /var/www/cgi-bin/index.cgi\n\tScriptAlias /ssl /var/www/cgi-bin/ssl.cgi|" \
|
RUN sed -i "|DocumentRoot .*$|\tScriptAlias / /usr/lib/cgi-bin/index.cgi\n\tScriptAlias /ssl /var/www/cgi-bin/ssl.cgi|a" \
|
||||||
/etc/apache2/sites-available/000-default.conf
|
/etc/apache2/sites-available/000-default.conf
|
||||||
|
|
||||||
# Allow http to run these binaries as root with sudo
|
# 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
|
| sudo EDITOR='tee -a' visudo
|
||||||
|
|
||||||
# Copy over cgi and libs
|
# Copy over cgi and libs
|
||||||
COPY dashboard.cgi /var/www/cgi-bin/index.cgi
|
COPY dashboard.cgi /usr/lib/cgi-bin/index.cgi
|
||||||
COPY dashboard_ssl.cgi /var/www/cgi-bin/ssl.cgi
|
COPY dashboard_ssl.cgi /usr/lib/cgi-bin/ssl.cgi
|
||||||
# TODO: Copy only needed libs
|
# TODO: Copy only needed libs
|
||||||
COPY lib/ /usr/lib/wgapi/
|
COPY lib/ /usr/lib/wgapi/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue