分享一个在docker中配置nginx虚拟主机的配置文件
server {
    listen       80;
    server_name  a.b.local;
    root /www/a.b.local/public;
    location / {
        index index.php;
        include /etc/nginx/conf.d/rewrite/c.conf;
    }
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
        # expires 1s;
        add_header Cache-Control "no-cache, no-store, must-revalidate";
        access_log off;
    }
    location ~ .*\.(js|css)?$ {
        expires 7d;
        access_log off;
    }
    location ~ [^/]\.php(/|$) {
        fastcgi_pass   php:9000;
        include        fastcgi-php.conf;
        include        fastcgi_params;
    }
}