一 启动

nginx -s signal

Where signal may be one of the following:

  • stop — fast shutdown
  • quit — graceful shutdown
  • reload — reloading the configuration file
  • reopen — reopening the log files

nginx -c nginx.conf  指定配置文件

二 配置文件

块关系

  main    *events

         *http       **server    ***location     

      

三 目录设置

设置文件根目录

location / {
root /data/www;
}

四 简单代理设置

设置1

server {
  代理服务器IP+PORT设置
location / {
proxy_pass http://localhost:8080/;
}

所有 .(gif|jpg|png) 文件均访问本服务器,其他文件访问代理服务器
~ 表示后面为正则表达式
location ~ \.(gif|jpg|png)$ {
root /data/images;
}
}

设置2

server {
  所有.html文件都访问代理服务器
location ~ *.html$ {
proxy_pass http://localhost:8080/;
}
}

五 FastCGI代理设置

所有.cgi请求都访问FastCGI代理
location ~ *.cgi$ {
  设置FastCGI代理IP+PORT
fastcgi_pass localhost:9000;
  设置默认.cgi
fastcgi_index index.cgi;
  包含fastcgi.conf中的所有fastcgi_param
include fastcgi.conf
}

nginx---Beginner's Guide的更多相关文章

  1. nginx Beginner’s Guide

    这个引导给nginx做了一个基本的介绍,并描述了nginx可以做的一些基本事情. 假设nginx已经安装在了读者的电脑上,如果没有请查看官网安装页. 这个引导描述了怎么去开始和结束nginx,从新加载 ...

  2. A Beginner's Guide to Paxos

    Google Drive: A Beginner's Guide to Paxos The code ideas of Paxos protocol: 1) Optimistic concurrenc ...

  3. Beginner's Guide to Python-新手指导

    Refer English Version: http://wiki.python.org/moin/BeginnersGuide New to programming? Python is free ...

  4. A Beginner's Guide To Understanding Convolutional Neural Networks(转)

    A Beginner's Guide To Understanding Convolutional Neural Networks Introduction Convolutional neural ...

  5. (转)A Beginner's Guide To Understanding Convolutional Neural Networks Part 2

    Adit Deshpande CS Undergrad at UCLA ('19) Blog About A Beginner's Guide To Understanding Convolution ...

  6. (转)A Beginner's Guide To Understanding Convolutional Neural Networks

    Adit Deshpande CS Undergrad at UCLA ('19) Blog About A Beginner's Guide To Understanding Convolution ...

  7. 新手教程之:循环网络和LSTM指南 (A Beginner’s Guide to Recurrent Networks and LSTMs)

    新手教程之:循环网络和LSTM指南 (A Beginner’s Guide to Recurrent Networks and LSTMs) 本文翻译自:http://deeplearning4j.o ...

  8. Beginner’s Guide(开始者向导)

    This guide gives a basic introduction to nginx and describes some simple tasks that can be done with ...

  9. Photography theory: a beginner's guide(telegraph.co.uk)

    By Diane Smyth, Tim Clark, Rachel Segal Hamilton and Lewis Bush 11:00AM BST 09 Jun 2014   Have you r ...

  10. A Beginner’s Guide to Eigenvectors, PCA, Covariance and Entropy

    A Beginner’s Guide to Eigenvectors, PCA, Covariance and Entropy Content: Linear Transformations Prin ...

随机推荐

  1. SQL SERVER中如何格式化日期

    1. SELECT convert(varchar, getdate(), 100) -- mon dd yyyy hh:mmAM (or PM)    -- Oct 2 2008 11:01AM  ...

  2. T-SQL 脚本

    1.USE语句 USE语句用于设置当前数据库,如果没有USE语句,那么就由执行脚本的任何用户来确定执行脚本时当前数据库是正确的.如果只是一个通用脚本,那么省去USE语句实际上可能更有益.通常,如果在脚 ...

  3. 关于HTML5 语音搜索的问题

    以前语音输入功能虽然没用过,但是看上去很高级的样子,有了智能手机之后,在ios和android中的语音输入,特别是iPhone的Siri,让一切变得如此简单,嘎嘎. 当然我不是在这里要实现如此强悍的功 ...

  4. Android SDK更新缓慢或无法更新的解决方法

    windows 解决方法就是修改C:\Windows\System32\drivers\etc\hosts文件.添加一行: 74.125.237.1       dl-ssl.google.com l ...

  5. invesments 第三章 上

    1. How firms issue securities: 公司如何发行股票 A.       primary market: 新的股票,债券和其他的证券第一次发行的market B.        ...

  6. httrack,webdup,WinHTTrack,WebZip

    怎么下载摄像头游戏jabbo,并使其能离线运行?修改 1.摄像头游戏jabbo:JABBO Ultimatum by LiveMurals Interactive电脑为:windows 7 32位.试 ...

  7. redhat6.3 64位更新源(使用网易源)全过程记录

    本篇博客参考:http://chinaxiaoyu.diandian.com/post/2013-01-24/40046529897.首先在浏览器中输入http://tel.mirrors.163.c ...

  8. fourinone分布式缓存研究和Redis分布式缓存研究

    最近在写一个天气数据推送的项目,准备用缓存来存储数据.下面分别介绍一下fourinone分布式缓存和Redis分布式缓存,然后对二者进行对比,以供大家参考. 1  fourinone分布式缓存特性 1 ...

  9. Mysql 添加用户和数据库授权

    注:我的运行环境是widnows xp professional + MySQL5.0 一, 创建用户: 命令:CREATE USER 'username'@'host' IDENTIFIED BY ...

  10. iterator的简单用法

    // 给你写了个简单的例子,不知道合不合你的题意? vector<int>vertical; ; i<; i++) { vertical.push_back(i); } vector ...