#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; #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on;
#tcp_nopush on; #keepalive_timeout 0;
keepalive_timeout 65; #gzip on; client_max_body_size 8M;
client_body_buffer_size 128k; server {
listen 80;
server_name front; charset utf-8; #access_log logs/host.access.log main; root E:/xampp/htdocs/html5/php/yii-advanced-app-2.0.6/advanced/frontend/web;
index index.php; location / {
try_files $uri $uri /index.php?$args;
} #error_page 404 /404.html; # redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
try_files $uri =404;
} # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
} server {
listen 80;
server_name back; charset utf-8; #access_log logs/host.access.log main; root E:/xampp/htdocs/html5/php/yii-advanced-app-2.0.6/advanced/backend/web;
index index.php; location / {
try_files $uri $uri /index.php?$args;
} #error_page 404 /404.html; # redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
} location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
try_files $uri =404;
} # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
} # another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias; # location / {
# root html;
# index index.html index.htm;
# }
#} # HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost; # ssl_certificate cert.pem;
# ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on; # location / {
# root html;
# index index.html index.htm;
# }
#} }

需要在C:\Windows\System32\drivers\etc\hosts中添加:

127.0.0.1 front
127.0.0.1 back

使用nginx部署Yii 2.0\yii-advanced-app-2.0.6的更多相关文章

  1. Yii 2.0.3 Advanced版控制器不能包含大写字母的Bug

    Yii 2.0.3 Advanced版控制器不能包含大写字母的Bug,我是直接下载Archive文件安装的,非Composer方式安装 Yii 框架之前是支持在Url中包含大写字母的 最新的Yii 2 ...

  2. Ubuntu 下使用 Nginx 部署 .NET Core 2.0 网站

    前言 本文介绍如何在 Ubuntu 16.04 服务器上安装 .NET Core 2.0 SDK.创建项目与发布,并使用 Nginx 部署 .NET Core 2.0 Web 项目. 安装 .NET ...

  3. 部署基于.netcore5.0的ABP框架后台Api服务端,以及使用Nginx部署Vue+Element前端应用

    前面介绍了很多关于ABP框架的后台Web API 服务端,以及基于Vue+Element前端应用,本篇针对两者的联合部署,以及对部署中遇到的问题进行处理.ABP框架的后端是基于.net core5.0 ...

  4. CentOS Mono Nginx 部署 MVC4+WebApi

    CentOS Mono Nginx 部署 MVC4+WebApi 经过几天的折磨,终于在CentOS上成功部署了MVC4+WebApi.Mono上的服务器推荐两种:Jexus(国产高人写的一款很牛的服 ...

  5. Ubuntu上通过nginx部署Django笔记

    Django的部署可以有很多方式,采用nginx+uwsgi的方式是其中比较常见的一种方式.今天在Ubuntu上使用Nginx部署Django服务,虽然不是第一次搞这个了,但是发现还是跳进了好多坑,g ...

  6. Ubuntu 14.04 上使用 Nginx 部署 Laravel

    本教程将会涉及以下工具: Ubuntu 14.04 LTS PHP 5.5 MySQL Laravel 5.0 Nginx 参考文章:Ubuntu 14.04 上使用 Nginx 部署 Laravel ...

  7. 使用uWSGI+nginx部署Django项目

    最近使用django写了一些项目,不过部署到服务器上碰到一些问题,还有静态文件什么的一堆问题,这里总结一下碰到的问题和解决方案,总体思路是按照官方文档走的. 原文地址:http://uwsgi-doc ...

  8. FastDFS+Nginx部署详细教程

    本例使用到的所有tar和zip包地址:http://download.csdn.net/detail/corey_jk/9758664 本例中使用CentOS1.CentOS2两台机器实现. 1 GC ...

  9. Centos6.5中Nginx部署基于IP的虚拟…

    Centos6.5 中Nginx 部署基于IP 的虚拟主机 王尚2014.11.18 一.介绍虚拟主机 虚拟主机是使用特殊的软硬件技术,把一台真实的物理电脑主机 分割成多个逻辑存储单元,每个单元都没有 ...

随机推荐

  1. linux curl 下载jdk

    进入orecle官网,找到需要的安装包 需要cookie同意相关协议才能下载 curl -L "http://download.oracle.com/otn-pub/java/jdk/8u1 ...

  2. jquery的dom操作

    DOM操作 $("p").appendTo("div");把p标签追加到div标签--中--后 $("p").prependTo(" ...

  3. Android驱动开发前的准备(四)

    源代码的下载和编译 4.1 下载.编译和测试Android源代码 4.2下载和编译linux内核源代码 4.1.1 配置Android源代码下载环境 (1) 创建一个用于存放下载脚本文件的目录 # m ...

  4. 《Web全栈工程师的自我修养》读书笔记(转载)

    [声明] 欢迎转载,但请保留文章原始出处→_→ 生命壹号:http://www.cnblogs.com/smyhvae/ 文章来源:http://www.cnblogs.com/smyhvae/p/5 ...

  5. C#对象比较

    http://www.veryhuo.com/a/view/42513.html ReferenceEquals:静态方法,不能重写,只能比较引用,如果有一个参数为null会返回false,不会抛出异 ...

  6. PHP Date()函数详细参数

    在页面的最前页加上 date_default_timezone_set(PRC); /*把时间调到北京时间,php5默认为格林威治标准时间*/ date () a: "am"或是& ...

  7. git的使用,通过git上传修改工程

    一:下载git,https://git-scm.com/downloads(若下载速度慢,可下载百度下的)接下来,默认配置,一直next 二:在github上注册账号,并新建一个项目test(英文有点 ...

  8. 计算bean的和(java)

    bean中的属性过多时,要计算一个bean的list之和是一件非常麻烦的事情,可以用java的反射机制解决这件事情,代码如下: package com.jzzhcs.utils; import jav ...

  9. C++命名空间问题

    名称空间支持是一项c++特性,是用来解决在编写大型程序中不同文件(厂商)中相同变量名问题.​ 例如:有两个已经封装好的产品(类)中同时包含一个名为wanda()的函数,为了能够准确调用其中一个wand ...

  10. EX:The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

    EX:The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secu ...