apache-httpd.conf.in 1.42 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27


<VirtualHost *:{{ parameter_dict['port'] }}>
  ServerAdmin admin@example.com
  DocumentRoot {{ parameter_dict['document-root'] }}

  SetEnvIf Origin "^http(s)?://(.+\.)?(app\.officejs\.com)$" ORIGIN_DOMAIN=$0
  Header always set Access-Control-Allow-Origin "%{ORIGIN_DOMAIN}e" env=ORIGIN_DOMAIN
  Header always set Access-Control-Allow-Credentials "true" env=ORIGIN_DOMAIN
  Header always set Access-Control-Allow-Methods "PROPFIND, PROPPATCH, COPY, MOVE, DELETE, MKCOL, LOCK, UNLOCK, PUT, GETLIB, VERSION-CONTROL, CHECKIN, CHECKOUT, UNCHECKOUT, REPORT, UPDATE, CANCELUPLOAD, HEAD, OPTIONS, GET, POST" env=ORIGIN_DOMAIN
  Header always set Access-Control-Allow-Headers "Overwrite, Destination, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Authorization" env=ORIGIN_DOMAIN


  <IfModule mod_headers.c>
   Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
  </IfModule>

  <Directory {{ parameter_dict['document-root'] }}>
      Options +FollowSymlinks
      AllowOverride All
      Require all granted
      SetEnv HOME {{ parameter_dict['document-root'] }}
      SetEnv HTTP_HOME {{ parameter_dict['document-root'] }}
      <IfModule mod_dav.c>
        Dav off
      </IfModule>
  </Directory>
28 29 30
  ErrorLog "{{ parameter_dict['log-dir'] }}/nextcloud-error.log"
  CustomLog "{{ parameter_dict['log-dir'] }}/nextcloud-access.log" combined

31
</VirtualHost>