nginx+php

使用php-fpm即可

以配置showdoc为例

 server{
        listen 8000;
        server_name 192.168.199.229 ehome-jia.jios.org;
        root /home;
        index index.html index.php;
        location / { 
                if (!-e $request_filename) {   
                            rewrite ^(.*)$ /index.php?s=$1 last;  
                            break;  
                    }   
        }   

        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;  
                    set $path_info "";  
                    set $real_script_name $fastcgi_script_name;  
                    if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {   
                            set $real_script_name $1;  
                            set $path_info $2;  
                    }   
                    fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;  
                    fastcgi_param SCRIPT_NAME $real_script_name;  
                    fastcgi_param PATH_INFO $path_info;  
        }   
  
        location ~ /\.ht {   
                    deny all;  
        }   
    } 

你可能感兴趣的:(nginx+php)