mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-15 04:04:50 +08:00
50 lines
1.6 KiB
Text
50 lines
1.6 KiB
Text
server {
|
|
listen 80 default;
|
|
listen 443 ssl;
|
|
server_name localhost _;
|
|
root /var/www;
|
|
|
|
index index.php index.html;
|
|
|
|
autoindex on;
|
|
charset utf-8;
|
|
client_max_body_size 500m;
|
|
|
|
ssl_certificate /etc/nginx/ssl/localhost.cert;
|
|
ssl_certificate_key /etc/nginx/ssl/localhost.key;
|
|
|
|
gzip on;
|
|
gzip_disable "msie6";
|
|
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
|
|
gzip_vary on;
|
|
|
|
access_log /var/log/nginx/default.access.log;
|
|
error_log /var/log/nginx/default.error.log;
|
|
|
|
location = /favicon.ico { access_log off; log_not_found off; }
|
|
location ~* favicon\.(ico|png)$ { access_log off; log_not_found off; }
|
|
location = /browserconfig.xml { access_log off; log_not_found off; }
|
|
location = /robots.txt { access_log off; log_not_found off; }
|
|
location = /humans.txt { access_log off; log_not_found off; }
|
|
location = /apple-touch-icon.png { access_log off; log_not_found off; }
|
|
location = /apple-touch-icon-precomposed.png { access_log off; log_not_found off; }
|
|
location ~ /\.ht { deny all; return 404; }
|
|
location ~ /\.git { deny all; return 404; }
|
|
location ~ /\.svn { deny all; return 404; }
|
|
|
|
location ~* ^.+\.(?:jpe?g|gif|bmp|ico|png|css|js|swf)$ {
|
|
expires 30d;
|
|
access_log off;
|
|
add_header Pragma public;
|
|
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
|
|
}
|
|
|
|
location ~ \.php(/|$) {
|
|
include fastcgi_params;
|
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param HTTPS off;
|
|
fastcgi_pass php:9000;
|
|
}
|
|
}
|