forked from GNUsocial/gnu-social
69 lines
1.6 KiB
Plaintext
69 lines
1.6 KiB
Plaintext
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 24M;
|
|
client_body_buffer_size 128k;
|
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
|
fastcgi_pass php-fpm;
|
|
}
|
|
}
|
|
|
|
location @webmail {
|
|
rewrite /webmail/(.*)$ /webmail/index.php?/$1 last;
|
|
}
|
|
|
|
location ~ ^/index\.php(/|$) {
|
|
fastcgi_pass php-fpm;
|
|
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://filter:11334/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
}
|