nginx 监听同一端口

#user nobody;
worker_processes 1; //主从进程

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - remoteuser[remote_user [remoteuser[time_local] “KaTeX parse error: Expected 'EOF', got '#' at position 16: request" ' #̲ …status bodybytessent"body_bytes_sent "bodybytessent"http_referer” ’
# ‘“httpuseragent""http_user_agent" "httpuseragent""http_x_forwarded_for”’;
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name 域名;
index index.html index.htm index.php;
location / {
root html/admin;
try_files $uri KaTeX parse error: Expected 'EOF', got '}' at position 53: ….html; }̲ #解决刷新问题 … /index.html last;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
}
server {
listen 80;
server_name 域名;
index index.html index.htm index.php;
location / {
root html/user;
try_files $uri KaTeX parse error: Expected 'EOF', got '}' at position 53: ….html; }̲ #解决刷新问题 … /index.html last;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
}
#转发
server {
listen 80;
server_name 域名;
index index.html index.htm index.php;
location / {
proxy_pass http://localhost:8086;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/548334.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

squid代理服务器在企业网中的应用

一,squid服务器概述 Squid是一种在Linux系统下使用的优秀的代理服务器软件。 squid不仅可用在Linux系统上,还可以用在AIX、Digital Unix、FreeBSD、HP-UX、Irix、NetBSD、Nextstep、SCO和Solaris等系统上。 Squid与Linux下其它的代理软件如Apache、Socks…

判断linux进程是否存在

#include #include #include int main() { FILE* fp; std::string buffer; fp popen(“ps -ef|grep 进程名| grep -v grep |wc -l”, “r”); //1&#xff1a;存在 &#xff1a;不存在 fread(&buffer[0], 1,1, fp); std::cout << buffer << std::endl; pclo…

MPLS ×××配置

MPLS 配置以下面拓扑为例配置MPLS 拓扑说明&#xff1a;R1&#xff0c;R2、R3路由器上分别配置Loopback1 接口&#xff0c;IP地址分别为1.1.1.1&#xff0c;2.2.2.2 3.3.3.3&#xff1b;并配置OSPF&#xff0c;让MPLS区域内的地址可以进行标签交换1、在MPLS区域配置标签交换R1&…

future promise shared_future简单使用

#include #include #include /furture 和promi******************/ int display(const int& value) { return 10 value; } //不能传引用&#xff0c;是简单的值拷贝 int display1(std::shared_future f) { //地方会一直等待&#xff0c;阻塞状态,由其它线程传入值 int…

Linux CentOS 查看服务器信息命令及其它常用命令

一&#xff1a;使用CentOS常用命令查看cpu more /proc/cpuinfo | grep “model name”grep “model name” /proc/cpuinfo[rootlocalhost /]# grep “CPU” /proc/cpuinfomodel name : Intel(R) Pentium(R) Dual CPU E2180 2.00GHzmodel name : Intel(R) Pentium(R) Dual CPU …

linux下使用c++17编译filesystem

#ifdef _WIN32 #include namespace fs std::filesystem; #else #include <experimental/filesystem> namespace fs std::experimental::filesystem; #endif #include int main() { auto path fs::path(“root/test.txt”); //后面会追加 fs::resize_file(path, 1024…

交叉编译脚本命令

::只显示echo echo off ::设置DOS环境的字体颜色 color 06 ::设置GOPATH路径和golandIDE相同 SET projectNameapetboss SET projectPathF:\project\h5gamesvr SET GOPATH%projectPath% ;SET CGO_ENABLED0 ;SET GOOSlinux ;SET GOARCHamd64 ;go build -v -o build/%projectNam…

oracle异常处理

2019独角兽企业重金招聘Python工程师标准>>> CREATE OR REPLACE PACKAGE BODY TEST_PACKAGE IS --异常分为&#xff1a;编译是错误(语法错误)、运行时错误(编译器无法检查&#xff0c;对应某些情况程序是可以正常执行的&#xff0c;但在某些特点情况下程序不会正确执…

Linux下调tcp最大参数

TCP并发请求溺出 调优&#xff1a;系统开启某个监听端口后&#xff0c;当多个TCP请求连接监听端后&#xff0c;会把多个请求交给backlog的默认监听队列由socket server一并处理&#xff0c;backlog有自己的队列长度默认128&#xff0c;当机器处理能力较慢且并发请求值较高时就要…

IOS程序内发短信

2019独角兽企业重金招聘Python工程师标准>>> iOS4.0新加入了MFMessageComposeViewController和MFMessageComposeViewControllerDelegate,提供了发送短信的接口,可以像发送邮件那样不用跳出程序来发送短信. 介绍可参阅Message UIFramework Reference 一些笔记: MFMes…

遍历tuple

#include #include namespace detail { template<class Tuple, class F, std::size_t…Is> void for_each(Tuple&& tuple, F&& f, std::index_sequence<Is…>) { using expand int[]; void(expand{ 0, (f(std::get(std::forward(tuple))), 0)……

JQUERY学习第二天之制作横纵向导航菜单

$(document).ready(function(){ //页面中的DOM已经装载完成时&#xff0c;执行的代码 $(".main > a").click(function(){ //找到主菜单项对应的子菜单项 var ulNode $(this).next("ul"); /* if (ulNode.css("display") "none"…

可变参数模板展开

//#include //#include //#include //#include //#include <type_traits> //#include void printer() { } template void printer(T a) { std::cout << a << std::endl; } //c11 template<class …Args> void printer(Args&&… args) …

增强决策能力

(1)克服从众心理。从众心理是指个体对社会的认识和态度常常受到群体对社会的认识和态度的左右。从众行为者的意识深处考虑的是自己的行为能否为大众所接受&#xff0c;追寻的是一种安全感。从众行为者认为群体的规范、他人的行为是正确的时候&#xff0c;就会表现出遵从&#x…

std::call_once写单列模式

#include #include #include class Singleton { public: static Singleton& GetInstance() { //c11保证唯一性 static std::once_flag flag; std::call_once(flag, { instance_.reset(new Singleton); }); return *instance_.get(); } ~Singleton() { std::cout <&l…

【转】关键字过滤算法

using System; using System.Collections.Generic; using System.Text; using System.Data; using System.Collections;namespace BLL.Common {#region 操作类public class KeywordsFilter{#region 关键字过滤/// <summary>/// 关键字过滤/// /// </summary>/// &l…

char*转wstring

void char_to_wchar(const char* ch, std::wstring& w_str) { wchar_t* wchar; int len MultiByteToWideChar(CP_ACP, 0, ch, strlen(ch), NULL, 0); wchar new wchar_t[len 1]; MultiByteToWideChar(CP_ACP, 0, ch, strlen(ch), wchar, len); wchar[len] ‘\0’; w_st…

如何用cmd命令加密文件夹

如何用cmd命令加密文件夹? 首先先从开始&#xff0d;运行中打开Cmd窗口。然后在cmd窗口中输入如下命令 md d:\test..\ 在d盘上创建一个名为test.的文件夹。我们刚才在d盘创建的那个文件夹在普通方式是打不开的&#xff0c;不信你就试试。 那么我们如何才能打开这个test.的文件…

任何项目都适用的CMakeLists配置

声明下&#xff1a;本人想把CMakeLists中的内容写好,csdn格式化了&#xff0c;无能为力&#xff0c;以下是本人在生产环境中已经使用过了。 测试代码: #include int main() { //不支持linux //#ifndef _DEBUG #ifndef DEBUG std::cout << “release” << std::end…

深入 Apache Kylin Cube 与查询优化

2019独角兽企业重金招聘Python工程师标准>>> 近几年&#xff0c;Apache Kylin作为一个高速的开源分布式大数据查询引擎正在迅速崛起。它充分发挥Hadoop、Spark、HBase等技术的优势&#xff0c;通过对超大规模数据集进行预计算&#xff0c;实现秒级甚至亚秒级的查询响…