vim /usr/local/nginx/conf
#user nobody;
worker_processes ; events {
worker_connections ;
}
http{
include vhost/*.conf;
} vim /usr/local/nginx/conf/vhost/walle.conf
include mime.types;
default_type application/octet-stream;
sendfile on;
upstream webservers {
server 0.0.0.0:5000 weight=1; # 负载设置
} server {
listen 80;
## server_name localhost; # 域名设置
access_log /data/wwwlogs/walle.log combined;
index index.html index.htm; # 日志目录 location / {
try_files $uri $uri/ /index.html;
add_header access-control-allow-origin *;
root /data/wwwroot/walle-web/fe; # 前端代码已集成到walle-web,即walle-web/fe的绝对路径
} location ^~ /api/ {
add_header access-control-allow-origin *;
proxy_pass http://127.0.0.1:5000;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Origin $host:$server_port;
proxy_set_header Referer $host:$server_port;
} location ^~ /socket.io/ {
add_header access-control-allow-origin *;
proxy_pass http://127.0.0.1:5000;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Origin $host:$server_port;
proxy_set_header Referer $host:$server_port;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true; # WebScoket Support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}

walle2.0 nginx.conf配置文件参数的更多相关文章

  1. [原]生产环境下的nginx.conf配置文件(多虚拟主机)

    [原]生产环境下的nginx.conf配置文件(多虚拟主机) 2013-12-27阅读110 评论0 我的生产环境下的nginx.conf配置文件,做了虚拟主机设置的,大家可以根据需求更改,下载即可在 ...

  2. Nginx 主配置文件参数详解

    Nginx 主配置文件参数详解 Nginx 安装完毕后,会有响应的安装目录,安装目录里 nginx.conf 为 nginx 的主配置文件, ginx 主配置文件分为 4 部分,main(全局配置). ...

  3. Nginx(二)------nginx.conf 配置文件

    上一篇博客我们将 nginx 安装在 /usr/local/nginx 目录下,其默认的配置文件都放在这个目录的 conf 目录下,而主配置文件 nginx.conf 也在其中,后续对 nginx 的 ...

  4. Nginx入门讲解——初步认识了解nginx.conf配置文件以及配置多个虚拟主机

    本文引自网络进攻学习之用https://blog.csdn.net/weixin_38111957/article/details/81080539 一. 引言上节文章讲述了如何用信号控制Nginx服 ...

  5. nginx.conf各参数的意义

    搬运+翻译至 http://qiita.com/syou007/items/3e2d410bbe65a364b603 /etc/nginx/nginx.conf 记录各个参数的意义 user user ...

  6. Nginx -- nginx.conf 配置文件详讲

    Nginx服务器配置,nginx.conf文件代码详讲,结合不同楼主的博文得到: #关掉访问日志可以优化服务器 #定义Nginx运行的用户和用户组 #user nobody; #nginx进程数 #如 ...

  7. nginx.conf配置文件里的upstream加入健康检查

    查看NGINX启用了那些模块: # ./nginx -V Tengine version: Tengine/ (nginx/) built by gcc (Red Hat -) (GCC) TLS S ...

  8. nginx.conf配置文件的简单说明

    #nginx 监听原理 先监听端口 --> 再配置域名 -->匹配到就访问local 否则 没有匹配到域名就默认访问第一个监听端口的local地址# vi nginx.conf user ...

  9. Nginx.conf 配置文件详细说明

    在此记录下Nginx服务器nginx.conf的配置文件说明, 部分注释收集与网络. #运行用户user www-data;    #启动进程,通常设置成和cpu的数量相等worker_process ...

随机推荐

  1. did not finish being created even after we waited 189 seconds or 61 attempts. And its status is downloading

    did not finish being created even after we waited 189 seconds or 61 attempts. And its status is down ...

  2. luogu4365 秘密袭击 (生成函数+线段树合并+拉格朗日插值)

    求所有可能联通块的第k大值的和,考虑枚举这个值: $ans=\sum\limits_{i=1}^{W}{i\sum\limits_{S}{[i是第K大]}}$ 设cnt[i]为连通块中值>=i的 ...

  3. 牛客小白月赛13 小A买彩票 (记忆化搜索)

    链接:https://ac.nowcoder.com/acm/contest/549/C来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言52428 ...

  4. Python学习day17 迭代器&生成器

    迭代器&生成器 1. 迭代器 1.1 迭代器 迭代:迭代是重复反馈过程的活动,其目的通常是为了逼近所需目标或结果.每一次对过程的重复称为一次"迭代" 迭代器:帮助对某种对象 ...

  5. CF487E Tourists--圆方树

    既然有这条性质,这题就很简单了: \(可能在a->b的简单路径上的点集,就是圆方树上a->b路径上方点代表的点双的并集\) 对每一个方点维护一个\(multiset\),代表其在圆方树上子 ...

  6. Django mysql应用

    环境:python3.Django2 1.安装驱动mysqlclient pip3 install mysqlclient 2.创建一个数据库 CREATE DATABASE database_nam ...

  7. 基础概念【softmax|normalizatoin|standardization】

    目录 一.softmax 二.normalization 三.standardization 一.softmax 为什么使用softmax,不用normalization? “max” because ...

  8. dpdk之路-环境部署

    dpdk实验环境部署 1.实验环境说明 vmware workstatioin 12 centos 7.5.1804 dpdk-stable-18.11.1 2.实验步骤 (1)虚拟机安装 http: ...

  9. 机器学习中模型泛化能力和过拟合现象(overfitting)的矛盾、以及其主要缓解方法正则化技术原理初探

    1. 偏差与方差 - 机器学习算法泛化性能分析 在一个项目中,我们通过设计和训练得到了一个model,该model的泛化可能很好,也可能不尽如人意,其背后的决定因素是什么呢?或者说我们可以从哪些方面去 ...

  10. 视频显著性检测-----Predicting Video Saliency using Object-to-Motion CNN and Two-layer Convolutional LSTM

    帧内显著性检测: 将卷积网络的多层特征进行组合通过unsampling 得到粗显著性预测: 帧间显著性检测: (粗检测结果+新卷积网络的特征图,最后+之前卷积网络的卷积特征输入到LSTM中)进行预测. ...