質問編集履歴

2

nginx設定ファイルの追加

2016/10/14 21:50

投稿

hangetuita
hangetuita

スコア13

test CHANGED
File without changes
test CHANGED
@@ -22,6 +22,8 @@
22
22
 
23
23
  -- /etc/nginx/sites-available/default
24
24
 
25
+ ```
26
+
25
27
  server {
26
28
 
27
29
  #listen 80 default_server;
@@ -80,10 +82,14 @@
80
82
 
81
83
  }
82
84
 
85
+ ```
86
+
83
87
 
84
88
 
85
89
  -- /etc/nginx/nginx.conf
86
90
 
91
+ ```
92
+
87
93
  user root;
88
94
 
89
95
  worker_processes auto;
@@ -257,3 +263,5 @@
257
263
  # }
258
264
 
259
265
  #}
266
+
267
+ ```

1

nginx設定ファイルの情報追加

2016/10/14 21:50

投稿

hangetuita
hangetuita

スコア13

test CHANGED
File without changes
test CHANGED
@@ -15,3 +15,245 @@
15
15
  同じようなエラーを発見して、解決された方はいますでしょうか?
16
16
 
17
17
  ヒントでも構いませんので、情報があればお願いいたします。
18
+
19
+
20
+
21
+ - nginx設定ファイル
22
+
23
+ -- /etc/nginx/sites-available/default
24
+
25
+ server {
26
+
27
+ #listen 80 default_server;
28
+
29
+ listen 80;
30
+
31
+ root /var/www/html;
32
+
33
+ autoindex on;
34
+
35
+ index index.php index.html index.htm;
36
+
37
+ charset UTF-8;
38
+
39
+
40
+
41
+ location / {
42
+
43
+ try_files $uri/ /index.php?$args;
44
+
45
+ }
46
+
47
+ location ~ \.php$ {
48
+
49
+ root /var/www/html;
50
+
51
+ try_files $uri =404;
52
+
53
+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
54
+
55
+ fastcgi_pass 127.0.0.1:9000;
56
+
57
+ fastcgi_index index.php;
58
+
59
+ include fastcgi.conf;
60
+
61
+ fastcgi_param SCRIPT_FILENAME
62
+
63
+ $document_root$fastcgi_script_name;
64
+
65
+ include fastcgi_params;
66
+
67
+ }
68
+
69
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|eot|otf|ttf|woff)$ {
70
+
71
+ add_header Access-Control-Allow-Origin *;
72
+
73
+ access_log off; log_not_found off; expires 30d;
74
+
75
+ }
76
+
77
+ location = /robots.txt { access_log off; log_not_found off; }
78
+
79
+ location ~ /\. { deny all; access_log off; log_not_found off; }
80
+
81
+ }
82
+
83
+
84
+
85
+ -- /etc/nginx/nginx.conf
86
+
87
+ user root;
88
+
89
+ worker_processes auto;
90
+
91
+ pid /run/nginx.pid;
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ events {
100
+
101
+ worker_connections 768;
102
+
103
+ multi_accept on;
104
+
105
+ }
106
+
107
+
108
+
109
+ http {
110
+
111
+
112
+
113
+ ##
114
+
115
+ # Basic Settings
116
+
117
+ ##
118
+
119
+
120
+
121
+ sendfile on;
122
+
123
+ tcp_nopush on;
124
+
125
+ tcp_nodelay on;
126
+
127
+ keepalive_timeout 65;
128
+
129
+ types_hash_max_size 2048;
130
+
131
+ # server_tokens off;
132
+
133
+
134
+
135
+ # server_names_hash_bucket_size 64;
136
+
137
+ # server_name_in_redirect off;
138
+
139
+
140
+
141
+ include /etc/nginx/mime.types;
142
+
143
+ default_type application/octet-stream;
144
+
145
+
146
+
147
+ ##
148
+
149
+ # SSL Settings
150
+
151
+ ##
152
+
153
+
154
+
155
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
156
+
157
+ ssl_prefer_server_ciphers on;
158
+
159
+
160
+
161
+ ##
162
+
163
+ # Logging Settings
164
+
165
+ ##
166
+
167
+
168
+
169
+ access_log /var/log/nginx/access.log;
170
+
171
+ error_log /var/log/nginx/error.log;
172
+
173
+
174
+
175
+ ##
176
+
177
+ # Gzip Settings
178
+
179
+ ##
180
+
181
+
182
+
183
+ gzip on;
184
+
185
+ gzip_disable "msie6";
186
+
187
+
188
+
189
+ # gzip_vary on;
190
+
191
+ # gzip_proxied any;
192
+
193
+ # gzip_comp_level 6;
194
+
195
+ # gzip_buffers 16 8k;
196
+
197
+ # gzip_http_version 1.1;
198
+
199
+ # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
200
+
201
+
202
+
203
+ ##
204
+
205
+ # Virtual Host Configs
206
+
207
+ ##
208
+
209
+
210
+
211
+ include /etc/nginx/conf.d/*.conf;
212
+
213
+ include /etc/nginx/sites-enabled/*;
214
+
215
+ }
216
+
217
+
218
+
219
+
220
+
221
+ #mail {
222
+
223
+ # # See sample authentication script at:
224
+
225
+ # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
226
+
227
+ #
228
+
229
+ # # auth_http localhost/auth.php;
230
+
231
+ # # pop3_capabilities "TOP" "USER";
232
+
233
+ # # imap_capabilities "IMAP4rev1" "UIDPLUS";
234
+
235
+ #
236
+
237
+ # server {
238
+
239
+ # listen localhost:110;
240
+
241
+ # protocol pop3;
242
+
243
+ # proxy on;
244
+
245
+ # }
246
+
247
+ #
248
+
249
+ # server {
250
+
251
+ # listen localhost:143;
252
+
253
+ # protocol imap;
254
+
255
+ # proxy on;
256
+
257
+ # }
258
+
259
+ #}