server {
listen 80;
server_name resys.oa.com;
index index.html index.htm index.php;
root /data/wwwroot/resys.oa.com;
location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|data|js|css|html|htm)$
{
expires 365d;
}
set $mefile '';
if ($request_uri !~* ((^/$)|/(api|static|by_upload_file)|s\.php|(.*(\.html|\.js|\.css|\.ico|\.txt).*)) ) {
rewrite ^/(.*)$ $mefile/index.php?$1 last;
}
access_log off;
}
转载于:https://my.oschina.net/vicall/blog/272062