-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web): increase max upload filesize for mail attachments
- Loading branch information
Showing
4 changed files
with
107 additions
and
69 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
user nginx; | ||
worker_processes auto; | ||
pcre_jit on; | ||
error_log /var/log/nginx/error.log warn; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
server_tokens off; | ||
client_max_body_size 64m; | ||
sendfile on; | ||
tcp_nopush on; | ||
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; | ||
ssl_prefer_server_ciphers on; | ||
ssl_session_cache shared:SSL:2m; | ||
ssl_session_timeout 1h; | ||
ssl_session_tickets off; | ||
gzip_vary on; | ||
|
||
map $http_upgrade $connection_upgrade { | ||
default upgrade; | ||
'' close; | ||
} | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
server { | ||
listen 80; | ||
absolute_redirect off; | ||
|
||
root /var/www/html/manager; | ||
|
||
location = /favicon.ico { | ||
log_not_found off; | ||
access_log off; | ||
} | ||
|
||
location /manager { | ||
return 301 /; | ||
} | ||
|
||
location ~ /\. { | ||
deny all; | ||
access_log off; | ||
log_not_found off; | ||
} | ||
|
||
location ~ \.(tpl|yml|ini|log)$ { | ||
deny all; | ||
} | ||
|
||
location / { | ||
try_files $uri /index.php$is_args$args; | ||
} | ||
|
||
location /webmail { | ||
alias /var/www/html/webmail; | ||
index index.php; | ||
try_files $uri $uri/ @webmail; | ||
|
||
location ~ \.php$ { | ||
include fastcgi_params; | ||
# Mitigate httpoxy vulnerability, see: https://httpoxy.org/ | ||
fastcgi_param HTTP_PROXY ""; | ||
|
||
fastcgi_buffers 8 16k; | ||
fastcgi_buffer_size 32k; | ||
|
||
client_max_body_size 64M; | ||
client_body_buffer_size 128k; | ||
fastcgi_param SCRIPT_FILENAME $request_filename; | ||
fastcgi_pass 127.0.0.1:9000; | ||
} | ||
} | ||
|
||
location @webmail { | ||
rewrite /webmail/(.*)$ /webmail/index.php?/$1 last; | ||
} | ||
|
||
location ~ ^/index\.php(/|$) { | ||
fastcgi_pass 127.0.0.1:9000; | ||
fastcgi_split_path_info ^(.+\.php)(/.*)$; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | ||
fastcgi_param DOCUMENT_ROOT $realpath_root; | ||
internal; | ||
} | ||
|
||
location /rspamd/ { | ||
proxy_pass http://{{ .Env.FILTER_HOST }}:11334/; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,6 @@ realpath_cache_ttl = 600 | |
|
||
expose_php = Off | ||
display_errors = Off | ||
|
||
upload_max_filesize = 50M | ||
post_max_size = 50M |