roundcube/rootfs/etc/confd/templates/nginx.conf.tmpl

55 lines
1.2 KiB
Cheetah
Raw Normal View History

2016-07-13 15:07:43 +00:00
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile off;
keepalive_timeout 65;
gzip off;
upstream php {
server 127.0.0.1:9000;
}
server {
listen 80;
server_name {{ getenv "DOMAIN"}};
root /var/lib/roundcube;
index index.php index.html;
client_max_body_size 1G;
location ~ ^/(data|config|\.ht|db_structure\.xml|README|AUTHORS|COPYING-AGPL|COPYING-README) {
deny all;
}
location / {
try_files $uri $uri/ index.php;
}
location ~ ^(?<script_name>.+?\.php)(?<path_info>/.*)?$ {
try_files $script_name = 404;
include fastcgi_params;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
fastcgi_read_timeout 300;
2016-07-13 15:13:10 +00:00
fastcgi_pass php;
2016-07-13 15:07:43 +00:00
}
location ~* ^.+.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
expires 30d;
access_log off;
}
}
}