walle2.0 nginx.conf配置文件参数
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配置文件参数的更多相关文章
- [原]生产环境下的nginx.conf配置文件(多虚拟主机)
[原]生产环境下的nginx.conf配置文件(多虚拟主机) 2013-12-27阅读110 评论0 我的生产环境下的nginx.conf配置文件,做了虚拟主机设置的,大家可以根据需求更改,下载即可在 ...
- Nginx 主配置文件参数详解
Nginx 主配置文件参数详解 Nginx 安装完毕后,会有响应的安装目录,安装目录里 nginx.conf 为 nginx 的主配置文件, ginx 主配置文件分为 4 部分,main(全局配置). ...
- Nginx(二)------nginx.conf 配置文件
上一篇博客我们将 nginx 安装在 /usr/local/nginx 目录下,其默认的配置文件都放在这个目录的 conf 目录下,而主配置文件 nginx.conf 也在其中,后续对 nginx 的 ...
- Nginx入门讲解——初步认识了解nginx.conf配置文件以及配置多个虚拟主机
本文引自网络进攻学习之用https://blog.csdn.net/weixin_38111957/article/details/81080539 一. 引言上节文章讲述了如何用信号控制Nginx服 ...
- nginx.conf各参数的意义
搬运+翻译至 http://qiita.com/syou007/items/3e2d410bbe65a364b603 /etc/nginx/nginx.conf 记录各个参数的意义 user user ...
- Nginx -- nginx.conf 配置文件详讲
Nginx服务器配置,nginx.conf文件代码详讲,结合不同楼主的博文得到: #关掉访问日志可以优化服务器 #定义Nginx运行的用户和用户组 #user nobody; #nginx进程数 #如 ...
- nginx.conf配置文件里的upstream加入健康检查
查看NGINX启用了那些模块: # ./nginx -V Tengine version: Tengine/ (nginx/) built by gcc (Red Hat -) (GCC) TLS S ...
- nginx.conf配置文件的简单说明
#nginx 监听原理 先监听端口 --> 再配置域名 -->匹配到就访问local 否则 没有匹配到域名就默认访问第一个监听端口的local地址# vi nginx.conf user ...
- Nginx.conf 配置文件详细说明
在此记录下Nginx服务器nginx.conf的配置文件说明, 部分注释收集与网络. #运行用户user www-data; #启动进程,通常设置成和cpu的数量相等worker_process ...
随机推荐
- HEOI2019游记
Day-x 菜死了. Day-1 上午准备出发了,外面的**鸟一直在叫. 咕咕咕(大雾 随后和高一的一块去火车站出发. 火车上先是和\(wjh\)聊闲天,然后开始讨论题. 然后\(wjh\)就随手出题 ...
- php对某个页面设置基础认证登录设置
记录下. 对某个页面设置认证 代码最开始添加: <?php $user = 'test'; $password = '111111'; // 通过HTTP认证进行验证 if (!isset($_ ...
- pycharm的Database连接新的Mysql5.7报错[08001]
在URL的后面增加参数: ?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC 解决. 原因是虽然mysql5.7的s ...
- Money King【题解】
我又傻了……竟然忘了区别大根堆和小根堆的性质,以至于一个符号打错,debug了半天……(我真是太菜了……) 题目描述 Once in a forest, there lived N aggressiv ...
- jq选择器(jq 与 js 互相转换),jq操作css样式 / 文本内容, jq操作类名,jq操作全局属性,jq获取盒子信息,jq获取位置信息
jq选择器(jq 与 js 互相转换) // 获取所有的页面元素jq对象 $('css3选择器语法'); var $box = $(".box:nth-child(1)"); 获取 ...
- logging 简单使用
import logging logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s <%(filename)s :%(li ...
- 激光推送(ios,安卓)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.I ...
- C语言strcpy,strncpy和strlcpy讲解
前言 C风格的字符串处理函数有很多,如strcpy().strcat()等等. strcpy与strcat char* strcpy (char* dest, const char* src); ch ...
- SW:HTML DOM
1:节点:nodeType,nodeValue,nodeName getAttributeNode() 方法从当前元素中通过名称获取属性节点. 元素节点nodeValue是null,属性节点nodeV ...
- git怎样删除未监视的文件untracked files
# 删除 untracked files git clean -f # 连 untracked 的目录也一起删掉 git clean -fd # 连 gitignore 的untrack 文件/目录也 ...