A wonderful [nginx] nginx issue 500 Internal Server Error phpstudy2018

A wonderful [nginx] nginx issue 500 Internal Server Error

solution

nginx has been reported that 500 Internal Server Error error, the configuration is generated by phpstudy2018 site domain management.

The default is the root "D: \ php \ phpstudy \ PHPTutorial \ WWW \ foxphp";

Modified in such a way just fine

 root   "D:\\php\\phpstudy\\PHPTutorial\\WWW\\foxphp";

Find a lot of information, because it is wonderful, how much wood for reference, before you configure a single slash wood has been a problem, could not find the hair is produced. Some say the problem address, perhaps the single slash is escaped as a symbol of it, it is a plus, then there is no then the, php can access the site through the domain name.

Well, nginx I do not have to learn the system from start to finish, there is generally enough. Personal humble opinion, I met wonderful problem to record down to share, may be able to bring help to others.

server {
        listen       80;
        server_name  k.cn ;
        root   "D:\\php\\phpstudy\PHPTutorial\\WWW\\kppw";
        location / {
            index  index.html index.htm index.php;
            #autoindex  on;
        }
        location ~ \.php(.*)$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO  $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
            include        fastcgi_params;
        }
}
server {
        listen       80;
        server_name  t.cn ;
        root   "D:\\php\\phpstudy\PHPTutorial\\WWW\\thinkphp\\public";
        location / {
            index  index.html index.htm index.php;
            #autoindex  on;
        }
        location ~ \.php(.*)$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO  $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
            include        fastcgi_params;
        }
}
server {
        listen       80;
        server_name  o.cn ;
        root   "D:\\php\\phpstudy\PHPTutorial\\WWW\\opensns";
        location / {
            index  index.html index.htm index.php;
            #autoindex  on;
        }
        location ~ \.php(.*)$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO  $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
            include        fastcgi_params;
        }
}
server {
        listen       80;
        server_name  f.cn ;
        root   "D:\\php\\phpstudy\\PHPTutorial\\WWW\\foxphp";
        location / {
            index  index.html index.htm index.php;
            #autoindex  on;
        }
        location ~ \.php(.*)$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO  $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
            include        fastcgi_params;
        }
}
server {
        listen       80;
        server_name  abc.cn;
        root   "D:\\php\\phpstudy\\PHPTutorial\\WWW\\test";
        location / {
            index  index.html index.htm index.php;
            autoindex  on;
        }
        location ~ \.php(.*)$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO  $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
            include        fastcgi_params;
        }
}

 

Guess you like

Origin www.cnblogs.com/landv/p/11366547.html