You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.2 KiB
Plaintext
51 lines
1.2 KiB
Plaintext
3 years ago
|
server {
|
||
|
listen 80 default_server;
|
||
|
listen [::]:80 default_server;
|
||
|
|
||
3 years ago
|
root /var/www/webmail;
|
||
|
|
||
|
include /etc/nginx/mime.types;
|
||
3 years ago
|
|
||
3 years ago
|
# /dev/stdout (Default), <path>, off
|
||
|
access_log off;
|
||
|
|
||
|
# /dev/stderr (Default), <path>, debug, info, notice, warn, error, crit, alert, emerg
|
||
3 years ago
|
error_log /dev/stderr notice;
|
||
3 years ago
|
|
||
|
index index.php;
|
||
|
|
||
3 years ago
|
# set maximum body size to configured limit
|
||
|
client_max_body_size {{ MESSAGE_SIZE_LIMIT|int + 8388608 }};
|
||
|
|
||
3 years ago
|
location / {
|
||
3 years ago
|
try_files $uri $uri/ /index.php$args;
|
||
3 years ago
|
}
|
||
|
|
||
|
location ~ \.php$ {
|
||
3 years ago
|
include /etc/nginx/fastcgi_params;
|
||
|
|
||
3 years ago
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||
3 years ago
|
|
||
3 years ago
|
fastcgi_intercept_errors on;
|
||
|
fastcgi_index index.php;
|
||
|
|
||
|
fastcgi_keep_conn on;
|
||
3 years ago
|
|
||
3 years ago
|
fastcgi_pass unix:/var/run/php7-fpm.sock;
|
||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||
3 years ago
|
{% if WEB_WEBMAIL == '/' %}
|
||
|
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||
|
{% else %}
|
||
|
fastcgi_param SCRIPT_NAME {{WEB_WEBMAIL}}/$fastcgi_script_name;
|
||
|
{% endif %}
|
||
3 years ago
|
}
|
||
|
|
||
|
location ~ /\.ht {
|
||
|
deny all;
|
||
|
}
|
||
|
|
||
|
location ^~ /data {
|
||
|
deny all;
|
||
|
}
|
||
|
}
|