博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
我的Nginx配置文件
阅读量:6978 次
发布时间:2019-06-27

本文共 2683 字,大约阅读时间需要 8 分钟。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#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
        
}
 
    
}
}

本文转自 netcorner 博客园博客,原文链接: http://www.cnblogs.com/netcorner/p/7209732.html  ,如需转载请自行联系原作者

你可能感兴趣的文章
我的友情链接
查看>>
Linux下SVN服务器支持Apache的http和svnserve独立服务器
查看>>
再测Golang的JSON库
查看>>
IDE set arguments
查看>>
Javascript 检查一组 radio 中的哪一个被勾选
查看>>
课程第五天内容《基础交换 五》
查看>>
pyramid参数
查看>>
struts2请求处理过程源代码分析(1)
查看>>
java中的char类型
查看>>
Windows XP下,JDK环境变量配置
查看>>
RabbitMQ (四) 路由选择 (Routing)
查看>>
关于ExtJS在使用下拉列表框的二级联动获取数据
查看>>
SPRING3.X JSON 406 和 中文乱码问题
查看>>
多个class相同的input标签 获取当前值!方法!
查看>>
模板方法模式与策略模式的区别
查看>>
html5地理定位数据
查看>>
《JAVA-枚举》
查看>>
使用photoshop 10.0制作符合社保要求的照片
查看>>
Python下使用tarfile模块来实现文件归档压缩与解压
查看>>
思科交换机各类型中字母的意思?
查看>>