worker_processes 2;
pid /run/nginx.pid;
user nginx;
events {
    worker_connections 2048;
}

http {
    include mime.types;
    server_tokens off;
    default_type application/octet-stream;

    log_format main_timed  '$remote_addr - $remote_user [$time_local] "$request" '
                            '$status $body_bytes_sent "$http_referer" '
                            '"$http_user_agent" "$http_x_forwarded_for" '
                            '$request_time $upstream_response_time $pipe $upstream_cache_status';

    access_log /dev/stdout main_timed;
    error_log /dev/stderr notice;
    client_max_body_size 20M;

    keepalive_timeout 65;
    server {
        listen [::]:80 default_server;
        listen 80 default_server;
        server_name feeldesk.yyide.vip;

        sendfile off;
        root /var/www/html/Web;
        index index.php index.html index.htm;
	location /
	{
		if (!-e $request_filename)
		{
		rewrite ^(.*)$ /index.php?s=$1 last;
		break;
                }
	}
        location ~ ^/index\.php$ {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include fastcgi_params;
        }

        error_page 500 502 503 504  /50x.html;
        location = /50x.html {
            root html;
        }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
            error_log /dev/null;
            access_log /dev/null;
        }

        location ~ .*\.(js|css)?$
        {
            expires      12h;
            error_log /dev/null;
            access_log /dev/null;
        }
        location ~ /\.(svn|git) {
            deny all;
        }
          error_log /var/log/nginx/https_error.log;
          access_log /var/log/nginx/https_access.log;
    }
}

