一个nginx vhost

server
       {
               listen       80;
               server_name qq1.gwy.test.nd qq.gwy.test.nd; 
        #        server_name _;
               #index index.html index.htm index.php;
               #root  /data0/htdocs/wwwqqgwy/public_html;
               root  /data0/htdocs/tencent/public_html;

        

              location / {
                    if (-f $request_filename) {
                            break;
                    }

                    if (-d $request_filename) {
                            break;
                    }

                    rewrite ^(.+)$ /index.php?kohana_uri=$1 last;

                    index  index.html index.htm index.php;
        }

        error_page  404              /404.html;

        location = /404.html {
            #root   /usr/share/nginx/html;
                root    /usr/local/webserver/nginx/html;
        }

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            #root   /usr/share/nginx/html;
                root    /usr/local/webserver/nginx/html;
        }

        location ~ ^(.+.php)(.*)$ {
                fastcgi_split_path_info ^(.+.php)(.*)$;
                fastcgi_pass 127.0.0.1:9000;
                #fastcgi_pass   unix:/var/run/php-fpm.sock;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME /data0/htdocs/tencent/public_html/$fastcgi_script_name;
                fastcgi_param  PATH_INFO $fastcgi_path_info;
                include fastcgi_params;
        }
          
               error_log  /data1/logs/qq.gwy_error.log;
              access_log  /data1/logs/qq.gwy_access.log main;
       }

你可能感兴趣的:(html,nginx,PHP,qq,Access)