去nginx官网下载相应的版本

下载地址:http://nginx.org/download/nginx-1.6.2.zip

下载完成解压放到你喜欢的目录下;楼主的放到了F:\nginx

进入windows的cmd窗口,输入如下所示的命令:

C:\Users\YiXian>F:
F:\>cd nginx
start   nginx.exe

启动成功后可以在windows任务管理中心看到nginx.exe的进程已经启动了

接下来就可以在浏览器中输入127.0.0.1回车可以看到

Welcome to nginx!

这里要记着别忘了把windows的IIS服务器给关掉,

nginx相应命令

nginx.exe -s stop                   //停止nginx
nginx.exe -s reload                //重新加载nginx
nginx.exe -s quit                     //退出nginx

注:上面的命令.exe可以不用的

nginx的相关配置当然也就在conf/nginx.conf中啦

#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;#nginx日志格式定义,在下面可以进行引用 #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  logs/access.log  main; #日志路径sendfile        on;#tcp_nopush     on;#keepalive_timeout  0;keepalive_timeout  65;#请求时间#gzip  on;开启gzip压缩  #server为设置的虚拟机,可以设多个 server {listen       80;#监听的端口  server_name  localhost;#监听的域名#charset koi8-r;#access_log  logs/host.access.log  main;#该虚拟机日志存放的位置location / {root   html;index  index.html index.htm;}#error_page  404              /404.html;# redirect server error pages to the static page /50x.html#error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}# proxy the PHP scripts to Apache listening on 127.0.0.1:80##location ~ \.php$ {#    proxy_pass   http://127.0.0.1;#}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000##location ~ \.php$ {#    root           html;#    fastcgi_pass   127.0.0.1:9000;#    fastcgi_index  index.php;#    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;#    include        fastcgi_params;#}# deny access to .htaccess files, if Apache's document root# concurs with nginx's one##location ~ /\.ht {#    deny  all;#}}# another virtual host using mix of IP-, name-, and port-based configuration##server {#    listen       8000;#    listen       somename:8080;#    server_name  somename  alias  another.alias;#    location / {#        root   html;#        index  index.html index.htm;#    }#}# HTTPS server##server {#    listen       443;#    server_name  localhost;#    ssl                  on;#    ssl_certificate      cert.pem;#    ssl_certificate_key  cert.key;#    ssl_session_timeout  5m;#    ssl_protocols  SSLv2 SSLv3 TLSv1;#    ssl_ciphers  HIGH:!aNULL:!MD5;#    ssl_prefer_server_ciphers   on;#    location / {#        root   html;#        index  index.html index.htm;#    }#}}

nginx windows 下安装和配置相关推荐

  1. 基于svnserve的SVN服务器(windows下安装与配置)

    基于svnserve的SVN服务器(windows下安装与配置) 关键字: svn 安装SVNserve 从http://subversion.tigris.org/servlets/ProjectD ...

  2. GTSAM在windows下安装,配置,简单调试

    GTSAM在windows下安装,配置,简单调试 BOOST安装配置 GTSAM安装配置 安装 配置 GTSAM简单调试 代码分析1 代码分析2 模型分析和结果展示 BOOST安装配置 链接: boo ...

  3. Redis在windows下安装与配置 (转)

    Redis在windows下安装与配置 原文地址:https://www.cnblogs.com/lezhifang/p/7027903.html 一.安装Redis 1. Redis官网下载地址:h ...

  4. Windows下安装和配置Mysql保姆级教程(图文说明)

    Windows下安装和配置Mysql保姆级教程(图文说明) 下面将向大家说明Windows下安装和配置Mysql的方法步骤. 文章目录 Windows下安装和配置Mysql保姆级教程(图文说明) 前言 ...

  5. Windows下安装Cygwin配置Hadoop集群

    Hadoop集群一般是配置到Linux系统之上,如果电脑用的是Windows系统,那么可以通过虚拟机安装Linux系统或者在Windows上安装Cygwin来模拟Linux环境,从而搭建Hadoop集 ...

  6. windows下安装和配置Redis

    一.下载windows版本的Redis 官网上不提供windows版本的,现在官网没有下载地址,只能在github上下载,官网只提供linux版本的下载    官网下载地址:redis.io/down ...

  7. windows下安装及配置 golang 的Web框架Beego环境

    1.首先需要安装配置 go and git,参考如下链接 https://www.cnblogs.com/zjwgo/p/9356280.html 2.安装配置 beego 前提: 安装并配置成功go ...

  8. windows下安装以及配置nginx

    转载于:https://www.cnblogs.com/jkr666666/p/7089413.html

  9. Windows下安装与配置Docker

    1.Windows相关 启用虚拟化,打开任务管理器,性能,查看虚拟化是否已启用,如下图所示: 启用Hyper-v,打开控制面板,启用或关闭Windows功能,勾选Hyper-v,确定即可(安装完Hyp ...

最新文章

  1. linux怎么停止ssh服务,Linux 故障排除:关闭 SSH 会话后如何保存工作状态?
  2. 添加绿色版UltraEdit到右键菜单
  3. linux下C++动态链接C++库示例详解
  4. android json解析及简单例子
  5. react封装函数_GitHub - daifee/react-component: 用 React 封装一套常用组件
  6. js定位div坐标存入mysql_JavaScript与Div 对层定位和移动获得坐标
  7. 2017/4/12 afternoon
  8. oracle in _all和any的区别,oracle经验之ANY,SOME,ALL区别
  9. MySQL数据库MyISAM与InnoDB存储引擎的比较
  10. asp代码转成php代码,轻松将简单的asp代码转换为php代码
  11. 深入理解HashMap底层数据结构
  12. PowerBuilder9.0窗口最小化没显示了
  13. 了解下常用分析JVM参数以及优化工具
  14. 10个免费的英文企业名称及品牌生成器
  15. Android 百度地图应用定位经纬度返回4.9E-324有关问题
  16. 理论力学知识要点归纳(一)
  17. 给人脸戴上口罩,Python实战项目来了
  18. 什么是开关量,I/O区分详细解答
  19. C++ 快速傅里叶变换
  20. Pytorch中tensor.view().permute().contiguous()函数理解

热门文章

  1. matlab 捕食者和猎物,MATLAB - 追求曲线(捕食者/猎物)
  2. 从零开始学android编程_android初学者的入门秘籍
  3. android jar导出,Android项目导出jar包的小技巧
  4. dataframe类型数据的遍历_Python零基础入门到爬虫再到数据分析,这些你都是要学会的...
  5. 发现在创建云服务器ecs实例的磁盘快照时_玩转ECS第7讲|ECS数据保护-数据备份新特性与最佳实践...
  6. crm——stark组件核心原理
  7. 【服务器】一次对Close_Wait 状态故障的排查经历
  8. BootstrapVue UI组件
  9. 理解js中的原型链,prototype与__proto__的关系
  10. 被LTRIM(RTRIM())害死了,差点