转自:https://blog.csdn.net/comeonyangzi/article/details/72466310

下载地址:http://nginx.org/download/

下载后直接解压到你的硬盘上  解压

启动nginx  以管理员身份运行

nginx

查看任务任务管理器里面会有nginx的进程

浏览器输入http://127.0.0.1 此时会出现nginx的欢迎界面,说明启动nginx成功。

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.


其他操作: 管理员身份运行cmd

nginx -s stop          // 停止nginx
nginx -s reload       // 重新加载配置文件
nginx -s quit          // 退出nginx

nginx反向代理配置:

找到conf/nginx.conf文件,编辑:

 worker_processes  1;

 events {
worker_connections 1024;
} http {
include mime.types;
default_type application/octet-stream; sendfile on; keepalive_timeout 65; server {
listen 8001;
server_name localhost; #charset koi8-r; #access_log logs/host.access.log main;
location / {
proxy_pass http://192.168.126.93:10080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
} } }

server下的结点:

listen:监听80端口

server_name:转发到哪个地址

proxy_pass:代理到哪个地址

nginx在windows下配置反向代理的更多相关文章

  1. Centos 7 上使用nginx为Node.js配置反向代理时错误:(13: Permission denied) while connecting to upstream

    错误来源:Centos 7 上使用nginx为Node.js配置反向代理时产生(13: Permission denied) while connecting to upstream的错误 nginx ...

  2. ubuntu下配置反向代理

    1. 环境 ubuntu:Ubuntu 13.04 x86-64 apache2: 2.2.22-6ubuntu5.1 amd64 2. 配置 2.1  配置应用 增加监听端口 打开/etc/apac ...

  3. ubuntu apache2 .htaccess 下配置 反向代理

    安装完apache2后, a2enmod rewrite //启用.htaccess规则 a2enmod proxy a2enmod proxy_http //启用反向代理支持 [P] 配置OK,就可 ...

  4. Nginx + django windows下配置

    1.下载nginx, 去http://nginx.org/en/download.html 下载,我下载的是1.8 stable版本. 2.配置文件/conf/nginx.conf #user nob ...

  5. 【Asp.net Core】在 Linux 子系统中安装 nginx 并配置反向代理

    上一篇鸟文中,老周已经介绍过在 Ubuntu 子系统中安装 dotnet-sdk 的方法,本文老周给大伙伴们说说安装 nginx 服务,并配置反向代理.同样,老周假设你从来没有用过 Linux,所以老 ...

  6. CentOS7 Nginx安装及配置反向代理

    背景: Mono (Mono JIT compiler version 5.4.0.201 ) jexus-5.8.2-x64(<CentOS7 安装 jexus-5.8.2-x64>) ...

  7. nginx配置反向代理详细教程(windows版)

    内容属于原创,如果需要转载,还请注明地址:http://www.cnblogs.com/j-star/p/8785334.html Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(I ...

  8. windows版 nginx配置反向代理实例教程 跳转tomcat和php网站

    抄自 https://www.cnblogs.com/j-star/p/8785334.html 个人理解 nginx端口设置为80,简称n tomcat端口设置为其他,例如8080,简称t php网 ...

  9. windows 下配置 Nginx 常见问题(转)

    windows 下配置 Nginx 常见问题 因为最近的项目需要用到负载均衡,不用考虑,当然用大名鼎鼎的Nginx啦.至于Nginx的介绍,这里就不多说了,直接进入主题如何在Windows下配置. 我 ...

随机推荐

  1. Java中的可变参数

    1.什么是可变参数 可变参数是JDK1.5的新特性,允许一个方式接受任意数量的参数 public static void main(String[] args) { print("a&quo ...

  2. 使用mysql以及连接数据库

    MySQL Table of Contents 1. 安装与配置 2. 数据库与账户 3. 用户跟权限 4. 常用命令 5. 表的创建 6. 数据类型 7. 主键约束 8. 表的修改 9. 引擎(En ...

  3. Mysql锁表问题解决过程

    开发中难免会遇到数据库操作锁表问题,这里说下解决过程,算是记录了. show OPEN TABLES where In_use > 0; 查看哪些表被锁了 show processlist 查看 ...

  4. 基于代理的数据库分库分表框架 Mycat实践

    192.168.199.75 MySQL . MyCAT master 192.168.199.74 MySQL slave 192.168.199.76 MySQL standby master 如 ...

  5. RF通过命令执行用例及自定义报告与日志的位置

    1.执行整个项目下的所有用例: pybot 项目路径.例如: pybot D:\robotPS:robot项目里面所有用例 2.执行某个suit中的所有用例: pybot 项目路径\suit文件名称. ...

  6. iOS堆栈内存区别

    堆和栈的区别: · 1> 堆空间的内存是动态分配的,一般存放对象,并且需要手动释放内存. · 2> 栈空间的内存由系统自动分配,一般存放局部变量等,不需要手动管理内存. 接下来我将从以下几 ...

  7. Vue开发调试神器 vue-devtools

    Vue开发调试神器: vue-devtools 1. 下载Chrome扩展插件GitHub下载地址: https://github.com/vuejs/vue-devtools 建议使用npm淘宝镜像 ...

  8. 《Using Python to Access Web Data》 Week5 Web Services and XML 课堂笔记

    Coursera课程<Using Python to Access Web Data> 密歇根大学 Week5 Web Services and XML 13.1 Data on the ...

  9. 13 oracle数据库坏块-逻辑坏块(模拟/修复)

    13 oracle数据库坏块-逻辑坏块 逻辑数据坏块的场景1)oracle bug也可能导致逻辑坏块的产生. 特别是parallel dml. 例如:Bug 5621677 Logical corru ...

  10. C 语言的函数 - 内存分析

    函数基本概念 Linux 中,函数在内存的代码段(code 区),地址比较靠前. 函数定义 C 语言中,函数有三个要素:入参.返回值.函数名,缺一不可.函数使用前必须先声明,或者在使用之前定义. 函数 ...