質問編集履歴
3
httpの部分追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -97,4 +97,56 @@
|
|
97
97
|
}
|
98
98
|
```
|
99
99
|
|
100
|
-
SSLを設定する前はhttpでアクセスできていたのでリバースプロキシなどの設定に問題はないかと思います。
|
100
|
+
SSLを設定する前はhttpでアクセスできていたのでリバースプロキシなどの設定に問題はないかと思います。
|
101
|
+
|
102
|
+
■追記---------
|
103
|
+
|
104
|
+
念のためその他の部分も載せておきます
|
105
|
+
|
106
|
+
/////////////////////////////////
|
107
|
+
|
108
|
+
```ここに言語を入力
|
109
|
+
http {
|
110
|
+
server_tokens off;
|
111
|
+
|
112
|
+
include /etc/nginx/mime.types;
|
113
|
+
default_type application/octet-stream;
|
114
|
+
charset UTF-8;
|
115
|
+
|
116
|
+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
117
|
+
'$status $body_bytes_sent "$http_referer" '
|
118
|
+
'"$http_user_agent" "$http_x_forwarded_for" "$request_body"';
|
119
|
+
|
120
|
+
access_log /var/log/nginx/access.log main;
|
121
|
+
|
122
|
+
sendfile on;
|
123
|
+
tcp_nopush on;
|
124
|
+
|
125
|
+
keepalive_timeout 15;
|
126
|
+
|
127
|
+
gzip_static on;
|
128
|
+
gzip on;
|
129
|
+
gzip_vary on;
|
130
|
+
gzip_proxied any;
|
131
|
+
gzip_http_version 1.1;
|
132
|
+
gzip_disable "msie6";
|
133
|
+
gzip_disable "Mozilla/4";
|
134
|
+
gzip_comp_level 6;
|
135
|
+
gzip_min_length 1024;
|
136
|
+
gzip_types text/css text/javascript application/javascript application/x-javascript;
|
137
|
+
|
138
|
+
proxy_redirect off;
|
139
|
+
proxy_set_header Host $host;
|
140
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
141
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
142
|
+
proxy_set_header X-Forwarded-Host $host;
|
143
|
+
proxy_set_header X-Forwarded-Server $host;
|
144
|
+
proxy_set_header X-Real-IP $remote_addr;
|
145
|
+
proxy_set_header X-Remote-Addr $remote_addr;
|
146
|
+
|
147
|
+
#include /etc/nginx/conf.d/*.conf;
|
148
|
+
include /etc/nginx/conf.d/dropip.conf;
|
149
|
+
include /etc/nginx/conf.d/vhost.conf;
|
150
|
+
}
|
151
|
+
|
152
|
+
```
|
2
一部修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
listen 443 ssl http2;
|
57
57
|
server_name test.net;
|
58
58
|
|
59
|
-
access_log
|
59
|
+
access_log アクセスログ;
|
60
60
|
|
61
61
|
ssl on;
|
62
62
|
|
@@ -95,4 +95,6 @@
|
|
95
95
|
break;
|
96
96
|
}
|
97
97
|
}
|
98
|
-
```
|
98
|
+
```
|
99
|
+
|
100
|
+
SSLを設定する前はhttpでアクセスできていたのでリバースプロキシなどの設定に問題はないかと思います。
|
1
設定ファイルの一部を公開s
title
CHANGED
File without changes
|
body
CHANGED
@@ -16,4 +16,83 @@
|
|
16
16
|
|
17
17
|
情報が不足している部分のあるかと思いますので、言っていただければ公開できる範囲で設定情報など公開いたします。
|
18
18
|
|
19
|
-
よろしくお願いします。
|
19
|
+
よろしくお願いします。
|
20
|
+
|
21
|
+
///////////////////////////////////////////////
|
22
|
+
|
23
|
+
指摘がありましたので設定ファイルの一部を下記に記載します。
|
24
|
+
|
25
|
+
また、サーバの情報ですが
|
26
|
+
|
27
|
+
```ここに言語を入力
|
28
|
+
CentOS 6.6 64bit
|
29
|
+
Nginx 1.9.11
|
30
|
+
Apache 2.2.29
|
31
|
+
OpenSSL 1.0.1e
|
32
|
+
```
|
33
|
+
|
34
|
+
になります。
|
35
|
+
|
36
|
+
```ここに言語を入力
|
37
|
+
server {
|
38
|
+
listen 80 default_server;
|
39
|
+
server_name _;
|
40
|
+
return 444;
|
41
|
+
}
|
42
|
+
server {
|
43
|
+
listen 443 ssl http2 default_server;
|
44
|
+
server_name _;
|
45
|
+
ssl on;
|
46
|
+
ssl_certificate 証明書の場所
|
47
|
+
ssl_certificate_key 鍵の場所
|
48
|
+
return 444;
|
49
|
+
}
|
50
|
+
server {
|
51
|
+
listen 80;
|
52
|
+
server_name test.net;
|
53
|
+
return 301 https://$host$request_uri;
|
54
|
+
}
|
55
|
+
server {
|
56
|
+
listen 443 ssl http2;
|
57
|
+
server_name test.net;
|
58
|
+
|
59
|
+
access_log /var/log/nginx/suitlovers.access.log;
|
60
|
+
|
61
|
+
ssl on;
|
62
|
+
|
63
|
+
ssl_certificate 証明書の場所
|
64
|
+
ssl_certificate_key 鍵の場所
|
65
|
+
|
66
|
+
location ~* \.(hta|htp|git) {
|
67
|
+
deny all;
|
68
|
+
break;
|
69
|
+
}
|
70
|
+
|
71
|
+
location ^~ /images/ {
|
72
|
+
root ドキュメントルート
|
73
|
+
ssi on;
|
74
|
+
expires 1d;
|
75
|
+
access_log off;
|
76
|
+
break;
|
77
|
+
}
|
78
|
+
location ^~ /css/ {
|
79
|
+
root ドキュメントルート
|
80
|
+
ssi on;
|
81
|
+
expires 1d;
|
82
|
+
access_log off;
|
83
|
+
break;
|
84
|
+
}
|
85
|
+
location ^~ /js/ {
|
86
|
+
root ドキュメントルート
|
87
|
+
ssi on;
|
88
|
+
expires 1d;
|
89
|
+
access_log off;
|
90
|
+
break;
|
91
|
+
}
|
92
|
+
|
93
|
+
location / {
|
94
|
+
proxy_pass https://127.0.0.1:8010;
|
95
|
+
break;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
```
|