mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
50 lines
992 B
Bash
50 lines
992 B
Bash
#! /bin/bash
|
|
|
|
set -e
|
|
|
|
export WEBADMIN=ncp
|
|
|
|
cat <<EOF
|
|
Listen 4443
|
|
<VirtualHost _default_:4443>
|
|
DocumentRoot /var/www/ncp-web
|
|
SSLEngine on
|
|
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
|
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
|
|
<IfModule mod_headers.c>
|
|
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains"
|
|
</IfModule>
|
|
|
|
# 2 days to avoid very big backups requests to timeout
|
|
TimeOut 172800
|
|
|
|
<IfModule mod_authnz_external.c>
|
|
DefineExternalAuth pwauth pipe /usr/sbin/pwauth
|
|
</IfModule>
|
|
|
|
</VirtualHost>
|
|
<Directory /var/www/ncp-web/>
|
|
|
|
AuthType Basic
|
|
AuthName "ncp-web login"
|
|
AuthBasicProvider external
|
|
AuthExternal pwauth
|
|
|
|
<RequireAll>
|
|
|
|
<RequireAny>
|
|
Require host localhost
|
|
Require local
|
|
Require ip 192.168
|
|
Require ip 172
|
|
Require ip 10
|
|
Require ip fe80::/10
|
|
Require ip fd00::/8
|
|
</RequireAny>
|
|
|
|
Require user $WEBADMIN
|
|
|
|
</RequireAll>
|
|
|
|
</Directory>
|
|
EOF |