Just use port 80 and be done with it
parent
1477c79abe
commit
5e0df1dc95
|
@ -12,10 +12,7 @@ RUN chown -R www-data:www-data /usr/lib/wgapi /var/log/wgapi /var/local/wgapi_to
|
|||
|
||||
# Configure apache
|
||||
RUN a2enmod cgi rewrite
|
||||
RUN sed -i "s/^Listen 80$/Listen ${ADMIN_PORT}/" /etc/apache2/ports.conf
|
||||
RUN sed -i -e "s/^<VirtualHost \*:80>$/<VirtualHost *:${ADMIN_PORT}>/" \
|
||||
-e "s|DocumentRoot .*$|DocumentRoot /usr/lib/cgi-bin\n\tSetHandler cgi-script\n\tOptions +ExecCGI|" \
|
||||
-e "s/ServerAdmin .*$/ServerAdmin ${ADMIN_EMAIL}/" \
|
||||
RUN sed -i 's|DocumentRoot .*$|DocumentRoot /usr/lib/cgi-bin\n\tSetHandler cgi-script\n\tOptions +ExecCGI|' \
|
||||
/etc/apache2/sites-available/000-default.conf
|
||||
|
||||
# Allow http user to run these binaries as root with sudo
|
||||
|
@ -29,5 +26,5 @@ COPY admin_user.cgi /usr/lib/cgi-bin/user
|
|||
COPY lib/ /usr/lib/wgapi/
|
||||
|
||||
# Run time!
|
||||
EXPOSE ${ADMIN_PORT}
|
||||
EXPOSE 80
|
||||
CMD ["apachectl", "-D", "FOREGROUND"]
|
||||
|
|
|
@ -13,9 +13,7 @@ RUN chown -R www-data:www-data /usr/lib/wgapi /var/log/wgapi /var/local/wgapi_to
|
|||
# Configure apache
|
||||
RUN a2enmod cgi rewrite
|
||||
RUN sed -i "s/^Listen 80$/Listen ${DASHBOARD_PORT}/" /etc/apache2/ports.conf
|
||||
RUN sed -i -e "s/^<VirtualHost \*:80>$/<VirtualHost *:${DASHBOARD_PORT}>/" \
|
||||
-e "s|DocumentRoot .*$|DocumentRoot /usr/lib/cgi-bin\n\tSetHandler cgi-script\n\tOptions +ExecCGI|" \
|
||||
-e "s/ServerAdmin .*$/ServerAdmin ${ADMIN_EMAIL}/" \
|
||||
RUN sed -i "s|DocumentRoot .*$|DocumentRoot /usr/lib/cgi-bin\n\tSetHandler cgi-script\n\tOptions +ExecCGI|" \
|
||||
/etc/apache2/sites-available/000-default.conf
|
||||
|
||||
# Allow http user to run these binaries as root with sudo
|
||||
|
@ -29,5 +27,5 @@ COPY dashboard_ssl.cgi /usr/lib/cgi-bin/ssl
|
|||
COPY lib/ /usr/lib/wgapi/
|
||||
|
||||
# Run time!
|
||||
EXPOSE ${DASHBOARD_PORT}
|
||||
EXPOSE 80
|
||||
CMD ["apachectl", "-D", "FOREGROUND"]
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
# FILE: /etc/wgapi/config
|
||||
# DESCRIPTION: Admin-editable configs
|
||||
|
||||
ADMIN_PORT=8080
|
||||
DASHBOARD_PORT=8081
|
||||
ADMIN_EMAIL='me@example.com'
|
||||
export TLD='tld'
|
||||
export LOGFILE='/var/log/apache2/error.log'
|
||||
export LOCAL_SERVER='myhost'
|
||||
|
|
Loading…
Reference in New Issue