|
@@ -1,15 +1,39 @@
|
|
|
server {
|
|
|
server_name localhost;
|
|
|
listen 80 default_server;
|
|
|
+ #listen 443 ssl;
|
|
|
+ #ssl_certificate /usr/local/openresty/nginx/conf/conf.d/ssl/mapi.jstyle.cn.pem;
|
|
|
+ #ssl_certificate_key /usr/local/openresty/nginx/conf/conf.d/ssl/mapi.jstyle.cn.key;
|
|
|
|
|
|
autoindex on;
|
|
|
|
|
|
- set $charset utf-8;
|
|
|
+ gzip on;
|
|
|
+ gzip_min_length 1k;
|
|
|
+ gzip_comp_level 2;
|
|
|
+ gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
|
|
|
+ gzip_vary on;
|
|
|
+ gzip_disable "MSIE [1-6]\.";
|
|
|
|
|
|
+ location ~* ^.+\.(ico|gif|jpg|jpeg|png)$ {
|
|
|
+ add_header Access-Control-Allow-Origin *;
|
|
|
+ add_header Access-Control-Allow-Headers X-Requested-With;
|
|
|
+ add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
|
|
|
+ access_log off;
|
|
|
+ expires 30d;
|
|
|
+ }
|
|
|
+ location ~* ^.+\.(css|js|txt|xml|swf|wav)$ {
|
|
|
+ access_log off;
|
|
|
+ expires 24h;
|
|
|
+ }
|
|
|
+ location ~* ^.+\.(eot|ttf|otf|woff|svg)$ {
|
|
|
+ access_log off;
|
|
|
+ expires max;
|
|
|
+ }
|
|
|
+
|
|
|
+ set $charset utf-8;
|
|
|
charset $charset;
|
|
|
|
|
|
set $rootdir /www;
|
|
|
-
|
|
|
if ( $request_uri ~* ^/(dever_package\/manage|dever_package\/ui|dever_package\/script) ) {
|
|
|
set $rootdir /share/lib/php;
|
|
|
}
|