nginx 访问PHP文件File not found.

作者:admin 发布:2018-03-20 浏览:1426次

    正确的Nginx配置文件:

    # another virtual host using mix of IP-, name-, and port-based configuration

    #

    server {

        listen       80;

        # listen       somename:8080;

        server_name  gd.com;


        root   /home/www/php;

        index index.php index.html index.htm;


        location ~ \.php$ {

        #     root            /home/www/php;

             fastcgi_pass   127.0.0.1:9000;

             fastcgi_index  index.php;

             fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;

             include        fastcgi_params;

        }


    }



你说的对:http://www.nginx.cn/562.html

Comments (0)