Compare commits
3 Commits
875b475295
...
b97b5665d6
Author | SHA1 | Date | |
---|---|---|---|
b97b5665d6 | |||
96f0922f9f | |||
80a45d5f8c |
@ -3,6 +3,7 @@
|
|||||||
WEBROOT=/data/www
|
WEBROOT=/data/www
|
||||||
WEBDAV_PORT=${WEBDAV_PORT:-8080}
|
WEBDAV_PORT=${WEBDAV_PORT:-8080}
|
||||||
PHP=${PHP:-none}
|
PHP=${PHP:-none}
|
||||||
|
POSTSIZE=${POSTSIZE:-256M}
|
||||||
USERNAME=${USERNAME:-theuser}
|
USERNAME=${USERNAME:-theuser}
|
||||||
PUID=${PUID:-1000}
|
PUID=${PUID:-1000}
|
||||||
GROUPNAME=${GROUPNAME:-thegroup}
|
GROUPNAME=${GROUPNAME:-thegroup}
|
||||||
@ -36,11 +37,21 @@ pm.max_children = ${FPM_MAX_CHILDREN}
|
|||||||
pm.start_servers = ${FPM_START_SERVERS}
|
pm.start_servers = ${FPM_START_SERVERS}
|
||||||
pm.min_spare_servers = ${FPM_MIN_SPARE_SERVERS}
|
pm.min_spare_servers = ${FPM_MIN_SPARE_SERVERS}
|
||||||
pm.max_spare_servers = ${FPM_MAX_SPARE_SERVERS}
|
pm.max_spare_servers = ${FPM_MAX_SPARE_SERVERS}
|
||||||
|
EOF
|
||||||
|
cat >"/etc/${PHP}/conf.d/post_size.ini" <<EOF
|
||||||
|
upload_max_size = ${POSTSIZE}
|
||||||
|
post_max_size = ${POSTSIZE}
|
||||||
|
upload_max_filesize = ${POSTSIZE}
|
||||||
|
upload_tmp_dir = /tmp
|
||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
cat >"/etc/nginx/custom.d/post_size.conf" <<EOF
|
||||||
|
client_max_body_size ${POSTSIZE};
|
||||||
|
EOF
|
||||||
|
|
||||||
# start php
|
# start php
|
||||||
case "${PHP}" in
|
case "${PHP}" in
|
||||||
"php7")
|
"php7")
|
||||||
@ -75,6 +86,9 @@ cat > /etc/nginx/conf.d/user.conf <<EOF
|
|||||||
user ${USERNAME} ${GROUPNAME};
|
user ${USERNAME} ${GROUPNAME};
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# fix permissions for upload
|
||||||
|
chown "${USERNAME}" /var/lib/nginx
|
||||||
|
|
||||||
cat > /etc/nginx/http.d/webdav.conf <<EOF
|
cat > /etc/nginx/http.d/webdav.conf <<EOF
|
||||||
server {
|
server {
|
||||||
listen ${WEBDAV_PORT} default_server;
|
listen ${WEBDAV_PORT} default_server;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
WEBROOT=/data/www
|
WEBROOT=/data/www
|
||||||
WEBDAV_PORT=${WEBDAV_PORT:-8080}
|
WEBDAV_PORT=${WEBDAV_PORT:-8080}
|
||||||
PHP=${PHP:-none}
|
PHP=${PHP:-none}
|
||||||
|
POSTSIZE=${POSTSIZE:-256M}
|
||||||
USERNAME=${USERNAME:-theuser}
|
USERNAME=${USERNAME:-theuser}
|
||||||
PUID=${PUID:-1000}
|
PUID=${PUID:-1000}
|
||||||
GROUPNAME=${GROUPNAME:-thegroup}
|
GROUPNAME=${GROUPNAME:-thegroup}
|
||||||
@ -36,11 +37,21 @@ pm.max_children = ${FPM_MAX_CHILDREN}
|
|||||||
pm.start_servers = ${FPM_START_SERVERS}
|
pm.start_servers = ${FPM_START_SERVERS}
|
||||||
pm.min_spare_servers = ${FPM_MIN_SPARE_SERVERS}
|
pm.min_spare_servers = ${FPM_MIN_SPARE_SERVERS}
|
||||||
pm.max_spare_servers = ${FPM_MAX_SPARE_SERVERS}
|
pm.max_spare_servers = ${FPM_MAX_SPARE_SERVERS}
|
||||||
|
EOF
|
||||||
|
cat >"/etc/${PHP}/conf.d/post_size.ini" <<EOF
|
||||||
|
upload_max_size = ${POSTSIZE}
|
||||||
|
post_max_size = ${POSTSIZE}
|
||||||
|
upload_max_filesize = ${POSTSIZE}
|
||||||
|
upload_tmp_dir = /tmp
|
||||||
EOF
|
EOF
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
cat >"/etc/nginx/custom.d/post_size.conf" <<EOF
|
||||||
|
client_max_body_size ${POSTSIZE};
|
||||||
|
EOF
|
||||||
|
|
||||||
# start php
|
# start php
|
||||||
case "${PHP}" in
|
case "${PHP}" in
|
||||||
"php84")
|
"php84")
|
||||||
@ -85,6 +96,9 @@ cat > /etc/nginx/conf.d/user.conf <<EOF
|
|||||||
user ${USERNAME} ${GROUPNAME};
|
user ${USERNAME} ${GROUPNAME};
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# fix permissions for upload
|
||||||
|
chown "${USERNAME}" /var/lib/nginx
|
||||||
|
|
||||||
cat > /etc/nginx/http.d/webdav.conf <<EOF
|
cat > /etc/nginx/http.d/webdav.conf <<EOF
|
||||||
server {
|
server {
|
||||||
listen ${WEBDAV_PORT} default_server;
|
listen ${WEBDAV_PORT} default_server;
|
||||||
|
@ -29,5 +29,6 @@ server {
|
|||||||
add_header Pragma "public";
|
add_header Pragma "public";
|
||||||
add_header Cache-Control "max-age=31536000, public";
|
add_header Cache-Control "max-age=31536000, public";
|
||||||
|
|
||||||
|
include /etc/nginx/local.d/*.conf;
|
||||||
include /etc/nginx/custom.d/*.conf;
|
include /etc/nginx/custom.d/*.conf;
|
||||||
}
|
}
|
||||||
|
@ -29,5 +29,6 @@ server {
|
|||||||
add_header Pragma "public";
|
add_header Pragma "public";
|
||||||
add_header Cache-Control "max-age=31536000, public";
|
add_header Cache-Control "max-age=31536000, public";
|
||||||
|
|
||||||
|
include /etc/nginx/local.d/*.conf;
|
||||||
include /etc/nginx/custom.d/*.conf;
|
include /etc/nginx/custom.d/*.conf;
|
||||||
}
|
}
|
||||||
|
0
rootfs/etc/nginx/local.d/.placeholder
Normal file
0
rootfs/etc/nginx/local.d/.placeholder
Normal file
Loading…
x
Reference in New Issue
Block a user