user www-data; worker_processes 4; pid /run/nginx.pid; events { worker_connections 768; } http { sendfile off; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; gzip on; gzip_disable "msie6"; server { listen 80; server_name localhost; index index.php; root /var/www; client_max_body_size 60M; # The hub shows this at /webmail/. Cypht builds its links from the address it was asked for ($request_uri, which stays as asked), # so it is handed the /webmail/ address and the files are found here without the prefix. location = /webmail { return 302 /webmail/; } location /webmail/ { rewrite ^/webmail/(.*)$ /$1 last; } location / { try_files $uri /index.php$is_args$args; } location ~ \.php { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_index index.php; fastcgi_pass 127.0.0.1:9000; } } }