参考版本nginx-1.10.3

一、常用命令

start nginx.exe                      //开启服务

nginx.exe -s stop                   //停止nginx

nginx.exe -s reload                //重新加载nginx

nginx.exe -s quit                     //退出nginx

nginx -t -c nginx.conf 文件路径命令来验证配置文件是否正确,验证成功后使用nginx -s reload重新加载配置文件

二、服务启动标志

三、简单配置

#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; #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; sendfile on;
#tcp_nopush on; #keepalive_timeout 0;
keepalive_timeout 65; #gzip on; server {
listen 80;
server_name dev.yumingyuming.com; #charset koi8-r; access_log logs/host.access.log;
error_log logs/host.error.log; location / {
root C:\Project\WEB.PMS.DMT\WEB.PMS.DMT\WEB.PMS.DMT;
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 C:\Project\WEB.PMS.DMT\WEB.PMS.DMT\WEB.PMS.DMT;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:80 location /api$ {
proxy_pass http://127.0.0.1:8010/api;
} # 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 ssl;
# server_name localhost; # ssl_certificate cert.pem;
# ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on; # location / {
# root html;
# index index.html index.htm;
# }
#} }

四、参考

Windows环境下安装和使用nginx

 

windows ngix 安装 配置 使用的更多相关文章

  1. 在windows下安装配置Ulipad

    在windows下安装配置Ulipad 今天推荐一款轻便的文本编辑器Ulipad,用来写一些小的Python脚本非常方便. Ulipad下载地址: https://github.com/limodou ...

  2. Windows下安装配置MongoDB

    Windows下安装配置MongoDB 一,介绍 MongoDB 是由C++语言编写的,是一个基于分布式文件存储的开源数据库系统.在高负载的情况下,添加更多的节点,可以保证服务器性能. MongoDB ...

  3. Windows平台安装配置mysql数据库

    Windows平台安装配置mysql数据库 作者:Eric 微信:loveoracle11g 去下载mysql软件 https://www.mysql.com/downloads/ https://d ...

  4. (转)windows 下安装配置 Nginx 详解

    windows 下安装配置 Nginx 详解 本文转自https://blog.csdn.net/kingscoming/article/details/79042874 nginx功能之一可以启动一 ...

  5. QT学习之windows下安装配置PyQt5

    windows下安装配置PyQt5 目录 为什么要学习QT 命令行安装PyQt5以及PyQt5-tools 配置QtDesigner.PyUIC及PyRcc 为什么要学习QT python下与界面开发 ...

  6. RabbitMQ学习在windows下安装配置

    RabbitMQ学习一. 在windows下安装配置 1.下载并安装erlang,http://www.erlang.org/download.html,最新版是R15B01(5.9.1).由于我机器 ...

  7. Windows下安装配置免安装MySQL5.7服务器

      Windows下安装配置免安装MySQL5.7服务器 1.下载.解压安装包 从MySQL官方网站上下载mysql-5.7.19-winx64.zip 下载完成后,把安装包解压到D:\DevSoft ...

  8. Windows下安装配置MySQL

    Windows下安装配置MySQL的基本步骤 一.MySQL下载 MySQL官方下载地址https://dev.mysql.com/downloads/mysql/5.7.html#downloads ...

  9. Windows下安装配置ant

    1.ant安装 请从官网下载ant的*.zip格式的安装包, Windows建议下载*.zip版本, Linux建议下载*.gz版本. 2.配置环境变量 解压之后,在Windows中配置环境变量, 在 ...

随机推荐

  1. [模板][P4719]动态dp

    Description: 给定一棵n个点的树,点带点权. 有m次操作,每次操作给定x,y,表示修改点x的权值为y. 你需要在每次操作之后求出这棵树的最大权独立集的权值大小. Hint: \(n,m&l ...

  2. [jzoj]1383.奇怪的问题

    Link https://jzoj.net/senior/#main/show/1383 Problem Alice总是会提出很多奇怪的问题,一天他让他的朋友Bob跟他一起研究一个奇怪的问题.问题是: ...

  3. Java 构造器 考虑用静态构造方法代替构造器

    类可以提供一个公有的静态工厂方法,它是一个返回类的实例的静态方法.静态工厂方法与设计模式中的工厂方法模式不同. 优势: 静态工厂方法与构造器不同的第一大优势在于,它们有名称.一个类只能有一个带有指定签 ...

  4. PAT基础6-7

    6-7 统计某类完全平方数 (20 分) 本题要求实现一个函数,判断任一给定整数N是否满足条件:它是完全平方数,又至少有两位数字相同,如144.676等. 函数接口定义: int IsTheNumbe ...

  5. 生成Area URL链接

    关于Area的URL链接生成,可以分为这么三种情况:第一种是在当前Area生成指向当前Area的链接:第二种是生成指向其他Area的链接:第三种是在某个Area中生成指向根目录的链接.下面是这三种情况 ...

  6. 3_主流部署方式介绍-Django+mod_wsgi+Apache

    安装apache yum install httpd httpd-devel -y 开机自动重启配置 chkconfig httpd on 重新编译安装python 删除编译记录及文件 修改apach ...

  7. pip的基本使用

    pip的基本使用 1.pip简介 pip 是一个现代的,通用的 Python 包管理工具.提供了对 Python 包的查找.下载.安装.卸载的功能 pip是官方推荐的安装和管理Python包的工具,用 ...

  8. delphi ListView 设置固定列宽

    object Form1: TForm1 Left = Top = Caption = 'Form1' ClientHeight = ClientWidth = Color = clBtnFace F ...

  9. Linux之清理linux内存cache

    转自:https://www.cnblogs.com/madsnotes/articles/5740495.html 频繁的文件访问会导致系统的Cache使用量大增.例如:在使用grep从很多文件中搜 ...

  10. 雅克比迭代算法(Jacobi Iterative Methods) -- [ mpi , c++]

    雅克比迭代,一般用来对线性方程组,进行求解.形如: \(a_{11}*x_{1} + a_{12}*x_{2} + a_{13}*x_{3} = b_{1}\) \(a_{21}*x_{1} + a_ ...