我的Nginx配置文件
#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 main; sendfile on;
#tcp_nopush on; #keepalive_timeout 0;
keepalive_timeout 65; #gzip on; upstream ingwill.com{
server 127.0.0.1:8080;
server 127.0.0.1:8081;
} server {
listen 80;
server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / {
proxy_pass http://ingwill.com;
proxy_redirect default;
} #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 html;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#} # 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;
server_name www.ingwill.com; #填写绑定证书的域名
ssl on;
ssl_certificate 1_www.ingwill.com_bundle.crt;
ssl_certificate_key 2_www.ingwill.com.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://ingwill.com;
proxy_redirect default;
proxy_connect_timeout 1;
proxy_read_timeout 1;
proxy_send_timeout 1;
} }
}
我的Nginx配置文件的更多相关文章
- Nginx配置文件nginx.conf中文详解(转)
######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数. worker_ ...
- 查看nginx配置文件路径
进入nginx安装目录(我的是/usr/local/nginx-1.7.8/) 进入sbin目录,输入 ./nginx -t查看nginx配置文件路径以及该文件语法是否正确 ./nginx -v查看n ...
- Nginx配置文件详解
Nginx是一款面向性能设计的HTTP服务器,相较于Apache.lighttpd具有占有内存少,稳定性高等优势. ######Nginx配置文件nginx.conf中文详解##### #定义Ngin ...
- 005.nginx配置文件
1.替换nginx主配置文件 通过前面的配置,LNMP的环境已经搭建完成,现在我们替换nginx配置文件: [root@huh ~]# cd /usr/local/nginx/conf/[root@h ...
- nginx配置文件nginx.conf超详细讲解
#nginx进程,一般设置为和cpu核数一样worker_processes 4; #错误日志存放目录 error_log /data1/logs/er ...
- 通过nginx配置文件抵御攻击
通过nginx配置文件抵御攻击 囧思九千 · 2013/11/12 12:22 0x00 前言 大家好,我们是OpenCDN团队的Twwy.这次我们来讲讲如何通过简单的配置文件来实现nginx防御攻击 ...
- Nginx配置文件nginx.conf详细说明
Nginx配置文件nginx.conf详细说明 #worker_processes 8; #worker_cpu_affinity 00000001 00000010 00000100 0000100 ...
- 【转】Nginx配置文件详细说明
Nginx配置文件详细说明 在此记录下Nginx服务器nginx.conf的配置文件说明, 部分注释收集与网络. #运行用户user www-data; #启动进程,通常设置成和cpu的数量相等 ...
- 一、Nginx配置文件详解
配置文件介绍 主要有两部分:分别是 main:主体部分 http{}:虚拟主机配置部分 配置指令主要以分号结尾:配置语法:directive value1 [value2 ....] 支持使用的变量 ...
- 【Nginx笔记】nginx配置文件具体解释
本文主要对nginx的配置做重点说明,关于nginx的其他基本概念.建议參考官网描写叙述.这里推荐Nginx Beginner's Guide这篇文档.对刚開始学习的人高速认识nginx非常有帮助. ...
随机推荐
- hdu 2825
题解: ac自动机+dp的题目 差不多都一个套路 记录枚举了i位,匹配到自动机上的x位,然后对于匹配了哪些单词状态压缩一下就可以了 代码: #include <bits/stdc++.h> ...
- 乐观锁和悲观锁及CAS实现
乐观锁与悲观锁 悲观锁:总是假设最坏的情况,每次去拿数据的时候都认为别人会修改,所以每次在拿数据的时候都会上锁,这样别人想拿这个数据就会阻塞直到它拿到锁.传统的关系型数据库里边就用到了很多这种锁机制, ...
- python全栈开发day13-迭代器、生成器、列表推导式等
昨日内容:函数的有用信息.带参数的装饰器.多个装饰器修饰一个函数 迭代器 可迭代对象:内部含有__iter__方法 迭代器 定义:可迭代对象.__iter__()就是迭代器,含有__iter__且__ ...
- maven环境的配置,如果jar包下载不下来,其他配置无错误的话,极有可能是网速的缘故
1首先下载apach maven 2配置maven环境变量 m2_home maven的源文件的路径 path变量后跟 %m2_home%\bin 3cmd 控制台运行mvn -version 查看 ...
- mysql DISTINCT的用法
http://justcoding.iteye.com/blog/2116837 SELECT count(*) FROM tablename:百万级别的数据也能很快返回结果,但是如果加了where条 ...
- centos关机、重启、图形界面与命令行界面切换命令
1.关机: init0; poweroff; halt; shutdown 2.重启: init1; reboot; 3.图形界面切换到命令行界面: init3; 或者,修改配置文件: #vi ...
- Mongodb - 切片搭建
0.概述 mongodb分片搭建,版本号4.0.2,以下除了创建opt文件夹以外,所有操作均在mongodb用户下面执行 准备三台机器:192.168.56.81192.168.56.82192.16 ...
- 观察者模式之ES6实现(一)
一.参考链接 https://github.com/JacksonTian/eventproxy/tree/master/lib 二.代码实现 // eventProxy.js 'use strict ...
- js实现文字超出部分用省略号代替实例代码
关于超出一定字数用省略号显示的问题,这种要求在我们日常开发的时候经常见到,我们之前基本都是用CSS来完成的,今天给大家分享个Javascript实现这个功能的示例代码,有需要的可以参考借鉴. 话不多说 ...
- CoordTools
APPLICATION_VERSION="JTNDYXBwbGljYXRpb24lMjBuYW1lJTIwJTNEJTIwJTIyQ29vcmRUb29sc1BybyUyMiUyMHZlcn ...