Skip to content

Commit

Permalink
feat(#213): allow turning frontend off
Browse files Browse the repository at this point in the history
  • Loading branch information
Jumpy-Squirrel committed Dec 23, 2023
1 parent faf41c5 commit 4f0b917
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ COPY ./httpd-container.conf /etc/apache2/regsys.conf
COPY ./public /static-html/reg-frontend/app
COPY ./html /static-html/reg-frontend

COPY ./html /static-html/reg-frontend-disabled

RUN chmod -R go=rX /static-html /etc/apache2/regsys.conf

RUN mkdir -p /run/apache2 && chmod 777 /run/apache2
Expand Down
20 changes: 6 additions & 14 deletions httpd-container.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ LoadModule proxy_module /usr/lib/apache2/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/mod_proxy_http.so
# LoadModule proxy_http2_module /usr/lib/apache2/mod_proxy_http2.so

ServerAdmin ${HTTPD_CONF_SERVER_ADMIN_EMAIL}
ServerSignature Off

<Directory />
Expand All @@ -43,19 +42,13 @@ ServerSignature Off

DocumentRoot "/static-html/htdocs"

<Directory "/var/www/localhost/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

<IfModule dir_module>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
</IfModule>

<Files ".ht*">
<Files ".ht*">
Require all denied
</Files>
</Files>

ErrorLog /dev/stdout
ErrorLogFormat "{ \"@timestamp\":\"%{cu}tZ\", \"log.level\": \"WARN\", \"function\" : \"[%-m:%l]\" , \"process\" : \"[pid %P:tid %T]\" , \"message\" : \"%M\"}"
Expand All @@ -71,12 +64,11 @@ CustomLog /dev/stdout json

<VirtualHost *:8080>
ServerName ${HTTPD_CONF_SERVER_NAME}
ServerAdmin ${HTTPD_CONF_SERVER_ADMIN_EMAIL}
DocumentRoot /static-html/reg-frontend
DocumentRoot /static-html/${HTTPD_CONF_STATIC_DIR}

Header always set Content-Security-Policy "default-src 'self' 'unsafe-inline'; img-src 'self' data: ; font-src 'self' data: ;"

<Directory /static-html/reg-frontend/>
<Directory /static-html/${HTTPD_CONF_STATIC_DIR}/>
Require all granted
Options FollowSymLinks MultiViews
</Directory>
Expand Down

0 comments on commit 4f0b917

Please sign in to comment.