nginx中conf配置
来源:互联网 发布:java读取文件Textfile 编辑:程序博客网 时间:2024/05/22 05:04
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
#root D:/www;
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
location ^~ /mall/ {
proxy_pass http://xx/mall/;
}
location ^~ /account/ {
proxy_pass http://xx/account/;
}
location ^~ /xxx/ {
proxy_pass http://xx/hzxxx/;
}
location ^~ /funds/ {
proxy_pass http://xx/funds/;
}
location ^~ /document/ {
proxy_pass http://xx/document/;
}
location ^~ /documentAuto/ {
proxy_pass http://xx/documentAuto/;
}
location ^~ /docai/ {
proxy_pass http://xx/docai/;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
#root D:/www;
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
location ^~ /mall/ {
proxy_pass http://xx/mall/;
}
location ^~ /account/ {
proxy_pass http://xx/account/;
}
location ^~ /xxx/ {
proxy_pass http://xx/hzxxx/;
}
location ^~ /funds/ {
proxy_pass http://xx/funds/;
}
location ^~ /document/ {
proxy_pass http://xx/document/;
}
location ^~ /documentAuto/ {
proxy_pass http://xx/documentAuto/;
}
location ^~ /docai/ {
proxy_pass http://xx/docai/;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
主要是配置匹配规则,具体的规则官网已经详细讲解,本文不再赘述。
location ^~ /docai/ { ------> 是 访问地址,使用正则表达式来进行匹配 如在本地 http://localhost/docai
proxy_pass http://xx/docai/; -----> 实际 运行地址(映射地址),运行在web容器上
}
主要用于反向代理使用
1 0
- nginx中conf配置
- Nginx conf/nginx.conf配置
- Nginx-配置-nginx.conf
- nginx nginx.conf 配置
- Nginx中conf的相关配置
- nginx.conf中关于nginx-rtmp-module配置指令详解
- nginx.conf配置说明
- nginx.conf配置详解
- Nginx配置conf
- Nginx.conf 配置小结
- nginx.conf 配置详解
- nginx配置www.conf
- nginx.conf配置说明
- nginx.conf配置
- nginx.conf配置参考
- nginx.conf的配置
- nginx.conf配置详解
- nginx conf location 配置
- 发布项目到JCenter中遇到的问题
- 为什么 没有缺省构造函数的类类型成员 必需要在初始化列表 里初始化 ?
- 深度探索C++关键字之 virtual
- 【转载】Sublime Text 3 插件的汉化、开发、发布方法教程(赵亮-碧海情天-theforevr)
- 参加会议(面向对象)
- nginx中conf配置
- 让页面不允许iframe嵌入,更加安全
- javaIO流
- Google Android开发者文档系列-创建有内容分享特性的应用之设置共享文件
- ROWNUMBER() OVER( PARTITION BY COL1 ORDER BY COL2)用法
- Hbase内存磁盘大致关系
- 选择法排序
- centos6.5安装docker
- C语言的标准和Gcc遵循标准