# 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. WampServer详解

    php能做什么,它是运行在服务器端的,web网站大部分数据都是存储在服务器上的,PHP就是用来处理这些存储在服务器的数据.跨平台,服务器可以是多种平台上的服务器,脚本语言,免费. wampserver ...

  2. kubectl 命令自动补全

    kubectl 命令自动补全 在linux上 # yum install -y bash-completion # source /usr/share/bash-completion/bash_com ...

  3. UniChat-软件工程小组-第一次作业-选题

    软件工程小组项目文档 小组成员:赵有为.张天善.宋春雨.郭凯璐.孙楠.冯韵瑶 Uni-Chat项目文档 需求分析Need ​ 日常生活中我们在使用Ubuntu等系统时都会因为QQ等聊天工具对基于Lin ...

  4. html布局-子div浮动后,父容器撑不开解决

    文章:子div撑不开父div的几种解决办法: 1,可以在所有子元素后增加<div style="clear:both;"></div> 2,给父容器增加样式 ...

  5. Spark中Task,Partition,RDD、节点数、Executor数、core数目(线程池)、mem数

    Spark中Task,Partition,RDD.节点数.Executor数.core数目的关系和Application,Driver,Job,Task,Stage理解 from:https://bl ...

  6. 用指针形式实现strstr函数

    char * mystrstr(char *dest,char * src){ char *p=null; char * temp=src; while(*dest)//只要不为'\0'就行 { p= ...

  7. docker的入门到放弃--docker基本命令

    docker的镜像中国:https://www.docker-cn.com/registry-mirror 1.搜索镜像 [root@localhost ~]# docker search tomca ...

  8. Java中复合赋值运算符自动进行强制类型转换

    public class Operation { public static void main(String[] args) { int num1 = 10; num1 = num1 / 2.2; ...

  9. 使用unsafe改善性能

    这种方式是Go所推荐的,优点就是安全,尽管这种操作会发生内存拷贝,导致性能上会有所损耗,这在处理一般业务时这种损耗是可以忽略的.但如果是拷贝频繁的情况下,想要进行性能优化时,就需要引入unsafe.P ...

  10. neo4j索引

    1.创建索引 CREATE INDEX ON : Disease (name) 2.查询所有创建的索引 :schema 或者 call db.indexes 3.删除索引 drop index on ...