nginx 配置多个目录
2015-09-17 16:56
656 查看
<pre name="code" class="python"> server { listen 8001; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root /t/deploy/zjdev/deployedApps/zjzc-web-frontEnd/; index index.html index.htm; } location /backoffice { root /t/deploy/zjdev/deployedApps/zjzc-web-backoffice/; index index.html index.htm; } #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; } } } ~ root:则是指定目录某个目录的父目录,如: locate /hello/ { root /a/; } 那么在/a/目录下必须有一个hello目录,否则报错.
相关文章推荐
- 分析nginx access log日志的命令
- linux nginx,php,mysql日志文件所在位置
- 服务器环境搭建 1 ---NGINX+TOMACT+MYSQL
- Nginx配置性能优化的方法
- Nginx+Keepalived搭建高可用负载均衡集群
- centos 6u5 搭建nginx+php+mysql环境。
- Nginx源码分析系列2:系统错误提示信息汇总
- Nginx配置文件
- Windows下Nginx的启动、停止等命令
- nginx支持静态文件post
- nginx启动脚本
- nginx启动脚本
- nginx 配置 (参照)
- nginx解析配置文件代码备忘
- Nginx 负载均衡-加权轮询策略剖析
- NGinx负载均衡策略
- Nginx+Django+Uwsgi+php
- windows下使用nginx(一)
- nginx 学习
- web服务器之LNMP(1)Ubuntu中Nginx的安装与配置