zoukankan      html  css  js  c++  java
  • nginx php 配置

    nginx php 环境的搭建步骤:

    1.nginx 配置:

    server {       

           listen       4446;        

           server_name  localhost;          

           location / {         

           root    C:/htdocs/first/public/;    

           index  index.php index.htm ;

            }     

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

         location ~ .php$ {    

           root           C:/htdocs/first/public/;       

           fastcgi_pass   127.0.0.1:9000;     

           fastcgi_index  index.php;     

          fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;       

          include        fastcgi_params;  

         }    

          # deny access to .htaccess files, if Apache's document root    

          # concurs with nginx's one      

          #      

         #location ~ /.ht {  

           #    deny  all;       

    }    

    }

    2. php.ini 文件的配置

    ;cgi.fix_pathinfo=1去掉;

     3.启动 php-cgi.exe

    使用php-cgi.exe -b 127.0.0.1:9000

    以上就是配置文件的设置。

  • 相关阅读:
    DHCP服务的配置(linux)
    LVM逻辑卷
    python的元素列表
    DOS和DDOS你知道多少?
    DOS与DDOS攻击的原理与防范之法
    常见HTTP状态代码,http报错代码翻译
    TCP和UDP优缺点
    DLL何时需共享内存管理器
    Delphi 指针大全
    Delphi编写DLL(以及静态和动态方式调用)
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/3519203.html
Copyright © 2011-2022 走看看