zoukankan      html  css  js  c++  java
  • 使用nginx部署Yii 2.0yii-basic-app-2.0.5

    nginx.conf

    #user nobody;
    worker_processes 1;

    #error_log logs/error.log;
    #error_log logs/error.log notice;
    #error_log logs/error.log info;

    #pid logs/nginx.pid;


    events {
           worker_connections 1024;
    }


    http {
       include mime.types;
       default_type application/octet-stream;

       sendfile on;

       keepalive_timeout 65;

       client_max_body_size 8M;

       client_body_buffer_size 128k; 

       server {

         listen 80;
         server_name localhost;

         root E:/xampp/htdocs/html5/php/yii-basic-app-2.0.5/basic/web;
         index index.php;

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

         error_page 500 502 503 504 /50x.html;

         location = /50x.html {
           root html;
         }

         location ~ .php$ {
           fastcgi_pass 127.0.0.1:9000;
           fastcgi_index index.php;
           fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
           include fastcgi_params;
         }

       }

    }

    说明:启动php、nginx之后,使用浏览器访问http://localhost/即可

    参考:安装 Yii - Yii 2.0 权威指南 - 文档 - Yii Framework 中文社区

       PHP For Windows/php-5.6.11-Win32-VC11-x64启动脚本

  • 相关阅读:
    VUE 路由
    JS小表达式
    JS正则表达式
    react案例—实现组件之间的通信
    React脚手架搭建
    react属性三ref
    react属性二props
    java多线程2
    jvm小结2
    spark小结3
  • 原文地址:https://www.cnblogs.com/jackiehe/p/4707368.html
Copyright © 2011-2022 走看看