nginx配置说明
#user nobody;
worker_processes ; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections ;
} 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 main; sendfile on;
#tcp_nopush on; #keepalive_timeout ;
keepalive_timeout ; ####################################begin###################################################
#gzip on;
## gzip on;
## gzip_http_version 1.1;
## gzip_comp_level ;
## gzip_types text/plain text/html text/css
## application/x-javascript text/xml
## application/xml application/xml+rss
## text/javascript;
#####################################################end#################################### server {
listen ;
server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / {
root html;
index index.html index.htm;
} error_page /.html; # redirect server error pages to the static page /50x.html
#
error_page /50x.html;
location = /50x.html {
root html;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:
#
location ~ \.asp$ {
proxy_pass http://10.1.78.12:8080;
}
location ~ \.php$ {
proxy_pass http://10.1.78.12:8090;
proxy_set_header X-Forwarded-For $remote_addr;
} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:;
# 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 ;
# listen somename:;
# server_name somename alias another.alias; # location / {
# root html;
# index index.html index.htm;
# }
#} # HTTPS server
#
#server {
# listen 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;
# }
#} }
nginx配置说明的更多相关文章
- 很详细的Nginx配置说明
这篇文章主要为大家分享了一篇很详细的Nginx配置说明,主要内容包括Nginx常用功能.Nginx配置文件结构,想要了解Nginx配置的朋友不要错过,参考一下 Nginx是lgor Sysoev为 ...
- nginx 配置说明及优化
一.配置说明 1. worker_processes 8; nginx 进程数,建议按照cpu 数目来指定,一般为它的倍数 (如,2个四核的cpu计为8). 2. worker_cpu_affin ...
- nginx 配置说明
======nginx 配置文件分开==== http://blog.csdn.net/baple/article/details/44197981 1.备份现在有nginx.conf2.复制ngin ...
- Nginx基本配置
1.Nginx官网下载安装程序,http://nginx.org/ 2.启动命令 启动:start nginx.exe停止:nginx -s stop 重新加载: nginx -s reload 3. ...
- 【转载】nginx 并发数问题思考:worker_connections,worker_processes与 max clients
注:这个文章主要是作者一直在研究nginx作为http server和反向代理服务器时候所谓最大的max_clients和 worker_connections的计算公式, 其实最后的结论也没有卡上公 ...
- nginx 并发数问题思考:worker_connections,worker_processes与 max clients
我相信,很多人都跟我一样,看书都不会太细致也不太认真思考,感觉书中讲的东西都应该是对的,最近读书时我发现以前认为理所当然的东西事实上压根都没有弄明白,最终的结果是,书是别人的,书中的知识也是别人的. ...
- 转载:负载均衡器技术Nginx和F5的优缺点对比
https://blog.csdn.net/zxc456733/article/details/78861100 nginx(一) nginx详解 nginx是一个被广泛使用的集群架构组件,我们有必要 ...
- windows环境vagrant修改静态资源文件,centos虚拟机中nginx的web环境下不生效
最近上手krpano,本地修改了krpano.html文件或者xml文件,在虚拟机环境打开文件是修改过来了,在nginx中就是不生效. 修改nginx.conf中http{}中的 sendfile ...
- 部署Nginx
部署Nginx #下载nginx wget http://nginx.org/download/nginx-1.12.2.tar.gz#安装依赖 yum install pcre-devel open ...
随机推荐
- SharePoint 2013 开发——SharePoint Designer 2013工作流
博客地址:http://blog.csdn.net/FoxDave SharePoint Designer 2013为开发者和高级用户提供了两种创建定制工作流的模式: 基于文本的设计器--即我们一直 ...
- C# WebRequestExtensions
https://gist.github.com/abombss/2720757 public static class WebRequestExtensions { public static Htt ...
- git——学习笔记(一)
http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/0013745374151782e ...
- poj2769 暴力
//Accepted 208 KB 157 ms //纯暴力 //vis数组初始化时要用多少设置多少,不然TLE #include <cstdio> #include <cstrin ...
- android avoiding-memory-leaks
android avoiding-memory-leaks Memory Leak是会有多个方面会引起的,比如Drawable, RemoteViews, Receiver, Cursor,Input ...
- RESTful Web Services测试工具推荐
命令行控的最爱:cURL cURL是一个很强大的支持各种协议的文件传输工具,用它来进行RESTful Web Services的测试简直是小菜一碟.这个工具基本上类Unix操作系统(各种Linux.M ...
- linux基础命令学习(三)Vim使用
1. # vim 1.txt 命令模式: a i o A I O x X yy dd p G dw de h j k l f H M B a --- append 追加 在光标所在位置后追加一个字符 ...
- 黑马程序员——【Java基础】——String、StringBuffer和基本数据包装类
---------- android培训.java培训.期待与您交流! ---------- 类String---------------------------------------------- ...
- Linux---- vim 插件
http://hi.baidu.com/omnice/blog/item/4ba97317cc67cc10962b4378.html fuzzyfinder.vim 可以替代四个插件, 不过这个插件也 ...
- 【LEETCODE OJ】Reorder List
Problem link: http://oj.leetcode.com/problems/reorder-list/ I think this problem should be a difficu ...