连续复制
一键复制
一键打包

反向代理

server {
    listen 80;
    server_name zt.h.com;
    location / {
        proxy_pass http://127.0.0.1:9000;
        index index.html index.htm;
    }
}

php网站配置

server{
    listen 80;
    server_name baidu120.p.com;
    root E:/wwwroot/baidu120;
    index index.php default.php index.html index.htm default.html default.htm;
    #error_page 404/404.html;
    error_page 404 /404.html;
    error_page 502 /502.html;

    location ~ \.php {
        #去掉$
        root           E:/wwwroot/baidu120;
        fastcgi_pass   127.0.0.1:8000;
        fastcgi_index  index.php;
        fastcgi_split_path_info ^(.+\.php)(.*)$;     #增加这一句
        fastcgi_param PATH_INFO $fastcgi_path_info;    #增加这一句
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }
}