#user nobody;
worker_processes  1;
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
#pid logs/nginx.pid;
events {
       worker_connections  1024;
}
http {
       include       mime.types;
       default_type  application/octet-stream;
sendfile on;
keepalive_timeout 65;
client_max_body_size 8M;
client_body_buffer_size 128k;
server {
             listen       80;
             server_name  localhost;
	     root   E:/xampp/htdocs/html5/php/yii-basic-app-2.0.5/basic/web;
             index  index.php;
             location / {
	           try_files $uri $uri/ /index.php?$args;
             }
error_page 500 502 503 504 /50x.html;
             location = /50x.html {
                   root   html;
             }
             location ~ \.php$ {
                   fastcgi_pass   127.0.0.1:9000;
                   fastcgi_index  index.php;
                   fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                   include        fastcgi_params;
             }
}
}
说明:启动php、nginx之后,使用浏览器访问http://localhost/即可
 
                    
                     
                    
                 
                    
                 
         
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号