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. MDS

    转载:https://blog.csdn.net/victoriaw/article/details/78500894 多维缩放(Multidimensional Scaling, MDS)是一组对象 ...

  2. iOS XIB使用中适配iPhoneX的安全区域、调用UiView动画

    2.调用UiView动画 WeakSelf; self.detailsViewBom.constant += 230; [UIView animateWithDuration:animotiontim ...

  3. [2019.03.22] Linux 学习心得(1)

    本文关键词:shell 判断.grep正则表达式使用和贪婪匹配理解 1. if [ $a -le $b ], 一开始自学的时候我以为 [ ... ] 就是普通的,语法规定的结构,结果其实人家是&quo ...

  4. Xshell连接ubuntu server端的vim(256色彩配置)

    VIM主题(Xshell端) [注]我的配置:Xshell连接VMware Workstation Pro下的Ubuntu 18 server版(要注意这里的server版,好似该版本没有下述的256 ...

  5. 老年OIer的Python实践记—— Codeforces Round #555 (Div. 3) solution

    对没错下面的代码全部是python 3(除了E的那个multiset) 题目链接:https://codeforces.com/contest/1157 A. Reachable Numbers 按位 ...

  6. Java技术栈思维导图

    Java技术栈思维导图 Java IO流体系 设计模式

  7. 【地图功能开发系列:一】根据当前坐标点获取距离不超过N公里的门店

    在此处输入标题 声明变量 //假设当前坐标 double lon1 = 113.336028; double lat1 = 23.21745; //距离m double distance = 1000 ...

  8. <Android基础> (六) 数据存储 Part 3 SQLite数据库存储

    6.4 SQLite数据库存储 SQLite是一种轻量级的关系型数据库,运算速度快,占用资源少. 6.4.1 创建数据库 Android为了管理数据库,专门提供了SQLiteOpenHelper帮助类 ...

  9. I2C(四)linux3.4(写代码)

    title: I2C(四)linux3.4(写代码) date: 2019/1/29 17:18:42 toc: true --- I2C(四)linux3.4(写代码) 老师的参考代码 https: ...

  10. [JDK8] Stream

    1 collect(toList()) collect(toList()) 方法由Stream 里的值生成一个列表,是一个及早求值操作. 2 map 如果有一个函数可以将一种类型的值转换成另外一种类型 ...