2022-05-10 03:49:19 +08:00
|
|
|
Listen 8000
|
|
|
|
<VirtualHost *:8000>
|
2022-10-30 08:02:46 +08:00
|
|
|
ServerName localhost
|
|
|
|
|
2022-09-21 00:56:22 +08:00
|
|
|
# Add error log
|
2023-06-18 05:01:44 +08:00
|
|
|
CustomLog /proc/self/fd/1 proxy
|
|
|
|
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
|
2022-12-05 17:54:34 +08:00
|
|
|
ErrorLog /proc/self/fd/2
|
2023-06-18 05:01:44 +08:00
|
|
|
ErrorLogFormat "[%t] [%l] [%E] [client: %{X-Forwarded-For}i] [%M] [%{User-Agent}i]"
|
|
|
|
LogLevel warn
|
2022-09-21 00:56:22 +08:00
|
|
|
|
2021-11-30 18:20:42 +08:00
|
|
|
# PHP match
|
|
|
|
<FilesMatch "\.php$">
|
2022-09-20 05:43:42 +08:00
|
|
|
SetHandler "proxy:fcgi://${NEXTCLOUD_HOST}:9000"
|
2021-11-30 18:20:42 +08:00
|
|
|
</FilesMatch>
|
2023-05-21 05:27:20 +08:00
|
|
|
|
2023-06-18 02:49:21 +08:00
|
|
|
# Enable Brotli compression for js, css and svg files - other plain files are compressed by Nextcloud by default
|
2023-05-21 05:27:20 +08:00
|
|
|
<IfModule mod_brotli.c>
|
2023-06-18 02:49:21 +08:00
|
|
|
AddOutputFilterByType BROTLI_COMPRESS text/javascript application/javascript application/x-javascript text/css image/svg+xml
|
2023-05-21 05:27:20 +08:00
|
|
|
BrotliCompressionQuality 0
|
|
|
|
</IfModule>
|
|
|
|
|
2021-11-30 18:20:42 +08:00
|
|
|
# Nextcloud dir
|
|
|
|
DocumentRoot /var/www/html/
|
|
|
|
<Directory /var/www/html/>
|
|
|
|
Options Indexes FollowSymLinks
|
|
|
|
Require all granted
|
|
|
|
AllowOverride All
|
|
|
|
Options FollowSymLinks MultiViews
|
|
|
|
Satisfy Any
|
|
|
|
<IfModule mod_dav.c>
|
|
|
|
Dav off
|
|
|
|
</IfModule>
|
|
|
|
</Directory>
|
|
|
|
# Deny access to .ht files
|
|
|
|
<Files ".ht*">
|
|
|
|
Require all denied
|
|
|
|
</Files>
|
2022-01-28 18:36:34 +08:00
|
|
|
|
|
|
|
# Fix zero file sizes
|
|
|
|
# See https://github.com/nextcloud/server/issues/3056#issuecomment-954209565
|
|
|
|
SetEnv proxy-sendcl 1
|
2022-08-22 16:19:28 +08:00
|
|
|
|
|
|
|
# See https://httpd.apache.org/docs/current/en/mod/core.html#limitrequestbody
|
2022-09-21 00:16:17 +08:00
|
|
|
LimitRequestBody ${APACHE_MAX_SIZE}
|
|
|
|
|
|
|
|
# See https://httpd.apache.org/docs/current/mod/core.html#timeout
|
|
|
|
Timeout ${APACHE_MAX_TIME}
|
|
|
|
|
|
|
|
# See https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxytimeout
|
|
|
|
ProxyTimeout ${APACHE_MAX_TIME}
|
2021-11-30 18:20:42 +08:00
|
|
|
</VirtualHost>
|