nginx---Beginner's Guide
2016-04-13 17:10
681 查看
一 启动
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; }
四 简单代理设置
设置1server { 代理服务器IP+PORT设置 location / { proxy_pass http://localhost:8080/; } 所有 .(gif|jpg|png) 文件均访问本服务器,其他文件访问代理服务器 ~ 表示后面为正则表达式 location ~ \.(gif|jpg|png)$ { root /data/images; } }
设置2
五 FastCGI代理设置
所有.cgi请求都访问FastCGI代理 location ~ *.cgi$ { 设置FastCGI代理IP+PORT fastcgi_pass localhost:9000; 设置默认.cgi fastcgi_index index.cgi; 包含fastcgi.conf中的所有fastcgi_param include fastcgi.conf }
相关文章推荐
- 3-Nginx 命令详解
- 1-Nginx 编译安装
- nginx代理出现数据被截断的问题
- HLS/MPEG-DASH/RTMP with nginx
- 使用Nginx抵御DDOS攻击
- centos+nginx安装配置及常见错误处理
- nginx配置指定路径去掉php后缀配置
- nginx初步尝试
- nginx linux环境下的安装
- 使用nginx后如何在web应用中获取用户ip及原理解释GOOD
- nginx访问日志没有内容
- nginx-1.8.0+php-5.6.15+mysql-5.6.27服务安装部署
- nginx配置之事件配置
- nginx配置之性能配置
- 高流量站点NGINX与PHP-fpm配置优化
- nchan-nginx
- Nginx下流量拦截算法 | 夏日小草
- Nginx在Linux和windows下的安装使用
- Nginx优化指南+LINUX内核优化+linux连接数优化+nginx连接数优化
- Nginx在Linux和windows下的安装使用