# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
worker_connections 1024;
}

http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;

include /etc/nginx/mime.types;
default_type application/octet-stream;

# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
server {
listen 8888;
server_name _;
root /usr/share/nginx/html;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

location / {
root /usr/share/nginx/html;
index index2.html;
}
}

upstream newpower_browser {
server 127.0.0.1:8888;
}

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location /newpowerbrowser/ {
#proxy_pass http://newpower_browser;
proxy_pass http://newpower_browser/index3.html;
}

error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
}

nginx 80 下的一个路径 到 8888的更多相关文章

  1. Linux下搭建一个nginx+2tomcat负载均衡环境(转)

    一.安装tomcat 1.将tomcat安装包上传到Linux下: 2.解压2个tomcat,并分别修改名称: 1).解压命令:unzip 2).修改用户名:mv 3.分别修改两个tomcat的端口号 ...

  2. 同一个dll 不同路径下注册 一个失败 一个成功

    一个路径下用regsvr32注册成功,一个注册失败,提示平台不兼容. 最后用depends查看依赖的dll,发现依赖的dll有问题,从注册成功的路径下复制一个过来,重新注册就成功了

  3. Java 递归获取一个路径下的所有文件,文件夹名称

    package com.readfile; import java.io.File; public class GetAllFiles { public static void main(String ...

  4. nginx 反向代理 公用一个外网端口

    服务器:ubuntu 配置nginx代理有2个文件,分别是sites-enabled 和sites-available. 路径都在/etc/nginx下,sites-enabled为sites-ava ...

  5. Nginx windows下搭建过程

    内容列表: 简要介绍 下载安装 配置测试 一.简要介绍 Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP ...

  6. 【转】Nginx windows下搭建过程

    Nginx windows下搭建过程 内容列表: 简要介绍 下载安装 配置测试 一.简要介绍 Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器, ...

  7. nginx(Window下安装 & 配置文件参数说明 & 实例)

    一.为什么需要对Tomcat服务器做负载均衡:  Tomcat服务器作为一个Web服务器,其并发数在300-500之间,如果有超过500的并发数便会出现Tomcat不能响应新的请求的情况,严重影响网站 ...

  8. Nginx 核心配置-新建一个web站点

    Nginx 核心配置-新建一个web站点 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.Nginx基础配置常用参数说明 [root@node101.yinzhengjie.or ...

  9. Nginx——Docker下安装部署

    前言 Nginx 是一个高性能的 HTTP 和反向代理 web 服务器,同时也提供了 IMAP/POP3/SMTP 服务 . 一. 环境说明 docker: 18.09.9-ce nginx: 1.1 ...

随机推荐

  1. nginx反向代理实现均衡负载及调度方法

    http upstream配置参数: ngx_http_upstream_module模块将多个服务器定义成服务器组,而由proxy_pass, fastcgi_pass等指令进行引用 upstrea ...

  2. springboot 使用常用注解

    找到方法封装成json格式 @RestController = @Controller+@ResponseBody //一个组合注解,用于快捷配置启动类,springboot启动主入口 @Spring ...

  3. [daily][archlinux] pacman 安装软件时404的问题

    时常,我们在archlinux上pacman安装一个软件时,会遇见如图这样的问题: “The requested URL returned error: 404”  [classic_tong @ 2 ...

  4. P1801 黑匣子[堆]

    题目描述 Black Box是一种原始的数据库.它可以储存一个整数数组,还有一个特别的变量i.最开始的时候Black Box是空的.而i等于0.这个Black Box要处理一串命令. 命令只有两种: ...

  5. 模拟赛20181031 雅礼 Wearry 养花 折射 画作

    % Day1 Solution % Wearry % Stay determined! 养花    考虑当 kkk 确定的时候如何求答案, 显然对于所有形如 [ak,(a+1)k)[ak, (a+1) ...

  6. Backpack IV

    Description Given an integer array nums[] which contains n unique positive numbers, num[i] indicate ...

  7. go mod

    https://blog.csdn.net/zzhongcy/article/details/97243826 来自为知笔记(Wiz)

  8. Prometheus监控学习笔记

    K8S最佳实战(包括了K8S的Prometheus监控和EFK日志搜集) https://jimmysong.io/kubernetes-handbook/practice/ Prometheus-b ...

  9. html 摄像头画面水平翻转

    <video onloadedmetadata="" id="inputVideo" autoplay muted playsinline>< ...

  10. C++函数调用方式约定stdcall,cdecl,pascal,naked,thiscall,fastcall

    https://www.cnblogs.com/xiangtingshen/p/11014514.html C++函数调用约定_cdecl约定:参数:从右向左依次入栈堆栈平衡:调用方平衡 #inclu ...