# for docker nginx config
upstream phpupstream {
   server php:9000 fail_timeout=5s max_fails=5;
}
server {
        listen  8080;
        server_name  localhost;
        root   /app/emshop;
        index  index.php index.html index.htm;
        client_max_body_size 2048M;

        location / {
            if (!-e $request_filename) {
                rewrite ^/(.*)$ /index.php last;
            }
        }

        location ~ \.php$ {
            fastcgi_pass   phpupstream;
            fastcgi_index index.php;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $fastcgi_path_info;
        }
    }