windows ngix 安装 配置 使用
参考版本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 ngix 安装 配置 使用的更多相关文章
- 在windows下安装配置Ulipad
在windows下安装配置Ulipad 今天推荐一款轻便的文本编辑器Ulipad,用来写一些小的Python脚本非常方便. Ulipad下载地址: https://github.com/limodou ...
- Windows下安装配置MongoDB
Windows下安装配置MongoDB 一,介绍 MongoDB 是由C++语言编写的,是一个基于分布式文件存储的开源数据库系统.在高负载的情况下,添加更多的节点,可以保证服务器性能. MongoDB ...
- Windows平台安装配置mysql数据库
Windows平台安装配置mysql数据库 作者:Eric 微信:loveoracle11g 去下载mysql软件 https://www.mysql.com/downloads/ https://d ...
- (转)windows 下安装配置 Nginx 详解
windows 下安装配置 Nginx 详解 本文转自https://blog.csdn.net/kingscoming/article/details/79042874 nginx功能之一可以启动一 ...
- QT学习之windows下安装配置PyQt5
windows下安装配置PyQt5 目录 为什么要学习QT 命令行安装PyQt5以及PyQt5-tools 配置QtDesigner.PyUIC及PyRcc 为什么要学习QT python下与界面开发 ...
- RabbitMQ学习在windows下安装配置
RabbitMQ学习一. 在windows下安装配置 1.下载并安装erlang,http://www.erlang.org/download.html,最新版是R15B01(5.9.1).由于我机器 ...
- Windows下安装配置免安装MySQL5.7服务器
Windows下安装配置免安装MySQL5.7服务器 1.下载.解压安装包 从MySQL官方网站上下载mysql-5.7.19-winx64.zip 下载完成后,把安装包解压到D:\DevSoft ...
- Windows下安装配置MySQL
Windows下安装配置MySQL的基本步骤 一.MySQL下载 MySQL官方下载地址https://dev.mysql.com/downloads/mysql/5.7.html#downloads ...
- Windows下安装配置ant
1.ant安装 请从官网下载ant的*.zip格式的安装包, Windows建议下载*.zip版本, Linux建议下载*.gz版本. 2.配置环境变量 解压之后,在Windows中配置环境变量, 在 ...
随机推荐
- 3. Spring 核心之 IOC(控制反转) & DI(依赖注入)
注:此文摘自 http://blog.csdn.net/it_man/article/details/4402245 IOC(DI):其实这个Spring架构核心的概念没有这么复杂,更不像有些书上描述 ...
- 创建触发器(trigger)
创建触发器 DROP TRIGGER IF EXISTS `ins_table_name`; DELIMITER ;; CREATE TRIGGER `ins_table_name` AFTER IN ...
- 让公式在网页传播——mathJAX
让公式在网页传播--mathJAX 对于学生党而言,写公式最好的工具是LaTeX,但LaTeX把公式展示到互联网上就有些困难,而使用截图又不太雅观.幸运的是,mathJAX引擎可以在浏览器中解析渲染数 ...
- python之面向对象的程序设计
一.什么是面向对象的程序设计 面向过程的程序设计的核心是过程,过程即解决问题的步骤,面向过程的设计就好比精心设计好一条流水线,考虑周全什么时候处理什么东西. 优点是:极大的降低了程序的复杂度 缺点是: ...
- python之函数第一篇
一.为什么用函数: 解决代码重用问题 统一维护 程序的组织结构清晰,可读性强二.定义函数 先定义后使用!! def funcname(arg1,arg2,...): """ ...
- C#_02.16_基础七_.NET表达式&运算符
C#_02.16_基础七_.NET表达式&运算符 一.字面量: 字面量和变量的关系来理解字面量会比较简单: 因此字面量是源代码中键入已知的(我们知道它是多少的)值.也可以理解是等号右边的非创建 ...
- Hibernate(6)关联关系_单向n对1
1.单向 n-1 关联只需从 n 的一端可以访问 1 的一端 2.实体类 n端:Order.java public class Order { private Integer orderId; pri ...
- .Net转Java.07.IDEA和VS常用操作、快捷键对照表
功能 IDEA 2017.1 快捷键 Visual Studio 2015 快捷键 文档 格式化整个文档 Ctrl+Alt+L Ctrl+E,D 或者 Ctrl+K,D 文件 显示最近的 ...
- 微信小程序判断用户是否需要再次授权获取个人信息
一.index.js设置如下 //获取用户的授权信息,放到本地缓存中 wx.getSetting({ success: (res) => { if(res.authSetting['scope. ...
- Android application捕获崩溃异常
Java代码 .收集所有 avtivity 用于彻底退出应用 .捕获崩溃异常,保存错误日志,并重启应用 , intent, , restartIntent); // 关闭当前应用 finishAllA ...