Skip to content

Commit

Permalink
Create separate module for the asset server
Browse files Browse the repository at this point in the history
  • Loading branch information
j-era committed Feb 5, 2018
0 parents commit adb97de
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM httpd:2.4.28

COPY conf/httpd.conf /usr/local/apache2/conf/httpd.conf

RUN mkdir -p /var/www/webdav
RUN chown -R daemon:daemon /var/www
83 changes: 83 additions & 0 deletions conf/httpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/access_log"
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
# will be interpreted as '/logs/access_log'.

ServerRoot "/usr/local/apache2"
Listen 80

LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule filter_module modules/mod_filter.so
LoadModule mime_module modules/mod_mime.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule dav_fs_module modules/mod_dav_fs.so

<IfModule unixd_module>
User daemon
Group daemon
</IfModule>

ServerAdmin you@example.com

DocumentRoot "/var/www/webdav"
DavLockDB "/var/www/DavLock"

<Directory "/var/www/webdav">
AllowOverride None
Require all granted

Dav on

Header set Cache-Control "max-age=31536000"

Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "DELETE, PUT, MKCOL, PROPFIND, PROPPATCH, COPY, MOVE, LOCK, UNLOCK"
Header set Access-Control-Allow-Headers "Depth"
</Directory>

ErrorLog /proc/self/fd/2
LogLevel warn

<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

CustomLog /proc/self/fd/1 common
</IfModule>

<IfModule mime_module>
TypesConfig conf/mime.types

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>

0 comments on commit adb97de

Please sign in to comment.