使用nginx部署Yii 2.0\yii-advanced-app-2.0.6
#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的更多相关文章
- Yii 2.0.3 Advanced版控制器不能包含大写字母的Bug
Yii 2.0.3 Advanced版控制器不能包含大写字母的Bug,我是直接下载Archive文件安装的,非Composer方式安装 Yii 框架之前是支持在Url中包含大写字母的 最新的Yii 2 ...
- Ubuntu 下使用 Nginx 部署 .NET Core 2.0 网站
前言 本文介绍如何在 Ubuntu 16.04 服务器上安装 .NET Core 2.0 SDK.创建项目与发布,并使用 Nginx 部署 .NET Core 2.0 Web 项目. 安装 .NET ...
- 部署基于.netcore5.0的ABP框架后台Api服务端,以及使用Nginx部署Vue+Element前端应用
前面介绍了很多关于ABP框架的后台Web API 服务端,以及基于Vue+Element前端应用,本篇针对两者的联合部署,以及对部署中遇到的问题进行处理.ABP框架的后端是基于.net core5.0 ...
- CentOS Mono Nginx 部署 MVC4+WebApi
CentOS Mono Nginx 部署 MVC4+WebApi 经过几天的折磨,终于在CentOS上成功部署了MVC4+WebApi.Mono上的服务器推荐两种:Jexus(国产高人写的一款很牛的服 ...
- Ubuntu上通过nginx部署Django笔记
Django的部署可以有很多方式,采用nginx+uwsgi的方式是其中比较常见的一种方式.今天在Ubuntu上使用Nginx部署Django服务,虽然不是第一次搞这个了,但是发现还是跳进了好多坑,g ...
- Ubuntu 14.04 上使用 Nginx 部署 Laravel
本教程将会涉及以下工具: Ubuntu 14.04 LTS PHP 5.5 MySQL Laravel 5.0 Nginx 参考文章:Ubuntu 14.04 上使用 Nginx 部署 Laravel ...
- 使用uWSGI+nginx部署Django项目
最近使用django写了一些项目,不过部署到服务器上碰到一些问题,还有静态文件什么的一堆问题,这里总结一下碰到的问题和解决方案,总体思路是按照官方文档走的. 原文地址:http://uwsgi-doc ...
- FastDFS+Nginx部署详细教程
本例使用到的所有tar和zip包地址:http://download.csdn.net/detail/corey_jk/9758664 本例中使用CentOS1.CentOS2两台机器实现. 1 GC ...
- Centos6.5中Nginx部署基于IP的虚拟…
Centos6.5 中Nginx 部署基于IP 的虚拟主机 王尚2014.11.18 一.介绍虚拟主机 虚拟主机是使用特殊的软硬件技术,把一台真实的物理电脑主机 分割成多个逻辑存储单元,每个单元都没有 ...
随机推荐
- 我对git认识
Git --- The stupid content tracker, 傻瓜内容跟踪器.Linus Torvalds 是这样给我们介绍 Git 的. Git 是用于 Linux内核开发的版本控 ...
- iOS 按钮点击变色
之前一直以为是要在selected状态下增加一个背景图片,效果是颜色变深,明明我的图片是变浅: 之后试了用hightlighted 成功. [_loginBtn setBackgroundImage: ...
- google.GIS小例子
var map; var array = [[41.774166667, 85.943055556], [43.864052, 87.560499]];//经纬度 var array1 = [&quo ...
- objdump 分析
objdump -H 显示如下: 一般常用的是 objdump -x 显示文件头信息 objdump -d 反汇编代码段代码 objdump -D 反汇编所有代码 用法:objdump <选项& ...
- 模仿console自写函数打印js的对象
本以为写个递归函数就可以将js的对象打印出来. 当然第一个想到的估计是JSON.stringify() 这个函数.但这个函数打印到浏览器 显示效果不友好.最友好的显示肯定是 控制台打印咯. 结果尝试打 ...
- php部分---PDO;
PDO数据访问抽象层 PDO的三个功能: 1.操作其它数据库2.事务功能3.防止SQL注入攻击 操作数据库: 造PDO对象 //$dsn = "mysql:dbname=mydb;host= ...
- SVN-Server搭建及配置
SVN是Subversion的简称,是一个开放源代码的版本控制系统,相较于RCS.CVS,它采用了分支管理系统,它的设计目标就是取代CVS.互联网上很多版本控制服务已从CVS迁移到Subversion ...
- 如何把一个用户加入sodu组
在一个命令前加sudo,可以使用超级用户的权限执行该命令.但并不是任何用户都可以使用sudo,只有用户属于sudo组时才能使用这个命令. 如 果希望把一个用户加入sudo组,可以用root登录系统,然 ...
- IDEA IntelliJ常用设置以及快捷键(转)
转载自:http://macrochen.iteye.com/blog/1035680 关于字体的设置 IDEA下使用雅黑Consolas混合字体 快捷贱, 快捷贱 , 快捷键贱 In ...
- Linear Algebra lecture7 note
Computing the nullspace (Ax=0) Pivot variables-free variables Special solutions: rref( A)=R rank o ...