转自: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:代理到哪个地址

最新文章

  1. AngularJS基础知识1
  2. 初学JAVA的 感想 尹鑫磊
  3. Titon Toolkit – 非常强大的用户界面组件
  4. Linux命令:nohup、df、du与/dev/null
  5. python学习之——小闹钟(持续完善ing)
  6. Python-str函数
  7. [转]高并发访问下避免对象缓存失效引发Dogpile效应
  8. db2查看表空间
  9. iOS之内购
  10. air写文件 SecurityError: fileWriteResource 时报错的解决方法
  11. SQL——找出某一字段中内容相同的数据
  12. LVS-负载均衡集群部署
  13. java上传图片
  14. 使用VSTS的Git进行版本控制(五)——从Team Services Portal管理分支
  15. u-boot移植(十三)---代码修改---裁剪及环境变量 一
  16. 如何合并ts文件?
  17. CentOS 7安装Oracle 11gR2以及设置自启动(1)
  18. 浅谈 REST 和 RESTFul API
  19. English trip -- VC(情景课)10 C I like to watch TV. 我爱看电视
  20. DAGDGC特殊调弦

热门文章

  1. [design pattern](3) Dectorator
  2. sqli-lab(14)
  3. JDBC API访问数据库的基本步骤。
  4. @清晰掉 string.h之基础堵漏
  5. SQL Server CDC最佳实践
  6. leetcode-mid-math-172. Factorial Trailing Zeroes-NO-????
  7. douyu danmu test c#
  8. VASP学习笔记--输入输出文件
  9. Vue知识整理10:条件渲染(v-if v-show)
  10. PushConsumer 消费消息