centos nginx php 转

时间:2022-06-19
本文章向大家介绍centos nginx php 转,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
server{  
    listen 80;  
    server_name xx; #项目域名
    location / {  
            root   /usr/share/nginx/html;  
            index  index.php index.html index.htm;  
        }  
        location ~ .php$ {  
            root           /usr/share/html;  
            fastcgi_pass   127.0.0.1:9000;  
            fastcgi_index  index.php;  
            #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;  
        fastcgi_param  SCRIPT_FILENAME  /data/html/demo1$fastcgi_script_name;  
            include        fastcgi_params;  
        }  
}  

(adsbygoogle = window.adsbygoogle || []).push({});