server {
listen 80;
server_name abc.com;
root /usr/local/JSPWeb/htdocs ;
index index.jsp index.htm index.html index.shtml;
location /test {
# stub_status on;
allow 192.168.0.0/24;
deny all;
}
location / {
ssi on;
ssi_silent_errors on;
ssi_types text/shtml;
}
location ~ .*\.jsp$ {
proxy_pass ;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
location ~* \.
(gif|jpg|jpeg|png|bmp|ico|rar|css|js|zip|java|jar|txt|flv|swf|txt|wma)$
{
root /usr/local/JSPWeb/htdocs;
expires 24h;
}
}
阅读(1656) | 评论(0) | 转发(1) |