質問編集履歴

11

情報追加

2017/01/19 09:41

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -302,199 +302,61 @@
302
302
 
303
303
 
304
304
 
305
- vim /etc/httpd/conf/httpd.conf
306
-
307
- ```
308
-
309
-
310
-
311
-
312
-
313
-
314
-
315
- #
316
-
317
- # Putting this all together, we can internationalize error responses.
318
-
319
- #
320
-
321
- # We use Alias to redirect any /error/HTTP_<error>.html.var response to
322
-
323
- # our collection of by-error message multi-language collections. We use
324
-
325
- # includes to substitute the appropriate text.
326
-
327
- #
328
-
329
-
330
-
331
-
332
-
333
- </IfModule>
334
-
335
- </IfModule>
336
-
337
-
338
-
339
- #
340
-
341
- # The following directives modify normal HTTP response behavior to
342
-
343
- # handle known problems with browser implementations.
344
-
345
- #
346
-
347
- BrowserMatch "Mozilla/2" nokeepalive
348
-
349
- BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
350
-
351
- BrowserMatch "RealPlayer 4\.0" force-response-1.0
352
-
353
- BrowserMatch "Java/1\.0" force-response-1.0
354
-
355
- BrowserMatch "JDK/1\.0" force-response-1.0
356
-
357
-
358
-
359
- #
360
-
361
- # The following directive disables redirects on non-GET requests for
362
-
363
- # a directory that does not include the trailing slash. This fixes a
364
-
365
- # problem with Microsoft WebFolders which does not appropriately handle
366
-
367
- # redirects for folders with DAV methods.
368
-
369
- # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
370
-
371
- #
372
-
373
- BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-caref
374
-
375
- ully
376
-
377
- BrowserMatch "MS FrontPage" redirect-carefully
378
-
379
- BrowserMatch "^WebDrive" redirect-carefully
380
-
381
- BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
382
-
383
- BrowserMatch "^gnome-vfs/1.0" redirect-carefully
384
-
385
- BrowserMatch "^XML Spy" redirect-carefully
386
-
387
- BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
388
-
389
-
390
-
391
- #
392
-
393
- # Allow server status reports generated by mod_status,
394
-
395
- # with the URL of http://servername/server-status
396
-
397
- # Change the ".example.com" to match your domain to enable.
398
-
399
- #
400
-
401
- #<Location /server-status>
402
-
403
- # SetHandler server-status
404
-
405
- # Order deny,allow
406
-
407
- # Deny from all
408
-
409
- # Allow from .example.com
410
-
411
- #</Location>
412
-
413
-
414
-
415
- #
416
-
417
- # Allow remote server configuration reports, with the URL of
418
-
419
- # http://servername/server-info (requires that mod_info.c be loaded).
420
-
421
- # Change the ".example.com" to match your domain to enable.
422
-
423
- #
424
-
425
- #<Location /server-info>
426
-
427
- # SetHandler server-info
428
-
429
- # Order deny,allow
430
-
431
- # Deny from all
432
-
433
- # Allow from .example.com
434
-
435
- #</Location>
436
-
437
-
438
-
439
-
440
-
441
-
442
-
443
-
444
-
445
- #
446
-
447
- # To enable a cache of proxied content, uncomment the following lines.
448
-
449
- # See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
450
-
451
- #
452
-
453
- #<IfModule mod_disk_cache.c>
454
-
455
- # CacheEnable disk /
456
-
457
- # CacheRoot "/var/cache/mod_proxy"
458
-
459
- #</IfModule>
460
-
461
- #
462
-
463
-
464
-
465
- #</IfModule>
466
-
467
-
468
-
469
- #
470
-
471
-
472
-
473
- #
474
-
475
- # VirtualHost example:
476
-
477
- # Almost any Apache directive may go into a VirtualHost container.
478
-
479
- # The first VirtualHost section is used for requests without a known
480
-
481
- # server name.
482
-
483
- #
484
-
485
- #<VirtualHost *:80>
486
-
487
- # ServerAdmin webmaster@dummy-host.example.com
488
-
489
- # DocumentRoot /www/docs/dummy-host.example.com
490
-
491
- # ServerName dummy-host.example.com
492
-
493
- # ErrorLog logs/dummy-host.example.com-error_log
494
-
495
- # CustomLog logs/dummy-host.example.com-access_log common
496
-
497
- #</VirtualHost>
305
+ エラーログ(less /var/log/httpd/error_log)
306
+
307
+ ```ここに言語を入力
308
+
309
+ [Thu Jan 19 11:37:29 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin
310
+
311
+ /suexec)
312
+
313
+ [Thu Jan 19 11:37:29 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin
314
+
315
+ /suexec)
316
+
317
+ [Thu Jan 19 11:37:29 2017] [notice] Digest: generating secret for digest authent
318
+
319
+ ication ...
320
+
321
+ [Thu Jan 19 11:37:29 2017] [notice] Digest: done
322
+
323
+ [Thu Jan 19 11:37:29 2017] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- res
324
+
325
+ uming normal operations
326
+
327
+ [Thu Jan 19 12:08:57 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin
328
+
329
+ /suexec)
330
+
331
+ [Thu Jan 19 12:08:57 2017] [notice] Digest: generating secret for digest authent
332
+
333
+ ication ...
334
+
335
+ [Thu Jan 19 12:08:57 2017] [notice] Digest: done
336
+
337
+ [Thu Jan 19 12:08:57 2017] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- res
338
+
339
+ uming normal operations
340
+
341
+ [Thu Jan 19 15:38:25 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin
342
+
343
+ /suexec)
344
+
345
+ [Thu Jan 19 15:38:25 2017] [notice] Digest: generating secret for digest authent
346
+
347
+ ication ...
348
+
349
+ [Thu Jan 19 15:38:25 2017] [notice] Digest: done
350
+
351
+ [Thu Jan 19 15:38:25 2017] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- res
352
+
353
+ uming normal operations
354
+
355
+ [Thu Jan 19 15:45:43 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin
356
+
357
+ /suexec)
358
+
359
+ /var/log/httpd/error_log
498
360
 
499
361
  ```
500
362
 

10

情報追加

2017/01/19 09:41

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -306,21 +306,165 @@
306
306
 
307
307
  ```
308
308
 
309
+
310
+
311
+
312
+
313
+
314
+
309
- #
315
+ #
310
-
316
+
311
- # Use name-based virtual hosting.
317
+ # Putting this all together, we can internationalize error responses.
312
-
318
+
313
- #
319
+ #
320
+
314
-
321
+ # We use Alias to redirect any /error/HTTP_<error>.html.var response to
322
+
323
+ # our collection of by-error message multi-language collections. We use
324
+
315
- #NameVirtualHost *:80
325
+ # includes to substitute the appropriate text.
316
-
326
+
317
- #
327
+ #
328
+
329
+
330
+
331
+
332
+
318
-
333
+ </IfModule>
334
+
335
+ </IfModule>
336
+
337
+
338
+
339
+ #
340
+
341
+ # The following directives modify normal HTTP response behavior to
342
+
343
+ # handle known problems with browser implementations.
344
+
345
+ #
346
+
347
+ BrowserMatch "Mozilla/2" nokeepalive
348
+
349
+ BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
350
+
351
+ BrowserMatch "RealPlayer 4\.0" force-response-1.0
352
+
353
+ BrowserMatch "Java/1\.0" force-response-1.0
354
+
355
+ BrowserMatch "JDK/1\.0" force-response-1.0
356
+
357
+
358
+
359
+ #
360
+
361
+ # The following directive disables redirects on non-GET requests for
362
+
319
- # NOTE: NameVirtualHost cannot be used without a port specifier
363
+ # a directory that does not include the trailing slash. This fixes a
320
-
364
+
321
- # (e.g. :80) if mod_ssl is being used, due to the nature of the
365
+ # problem with Microsoft WebFolders which does not appropriately handle
366
+
322
-
367
+ # redirects for folders with DAV methods.
368
+
369
+ # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
370
+
371
+ #
372
+
373
+ BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-caref
374
+
375
+ ully
376
+
377
+ BrowserMatch "MS FrontPage" redirect-carefully
378
+
379
+ BrowserMatch "^WebDrive" redirect-carefully
380
+
381
+ BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
382
+
383
+ BrowserMatch "^gnome-vfs/1.0" redirect-carefully
384
+
385
+ BrowserMatch "^XML Spy" redirect-carefully
386
+
387
+ BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
388
+
389
+
390
+
391
+ #
392
+
393
+ # Allow server status reports generated by mod_status,
394
+
395
+ # with the URL of http://servername/server-status
396
+
397
+ # Change the ".example.com" to match your domain to enable.
398
+
399
+ #
400
+
401
+ #<Location /server-status>
402
+
403
+ # SetHandler server-status
404
+
405
+ # Order deny,allow
406
+
323
- # SSL protocol.
407
+ # Deny from all
408
+
409
+ # Allow from .example.com
410
+
411
+ #</Location>
412
+
413
+
414
+
415
+ #
416
+
417
+ # Allow remote server configuration reports, with the URL of
418
+
419
+ # http://servername/server-info (requires that mod_info.c be loaded).
420
+
421
+ # Change the ".example.com" to match your domain to enable.
422
+
423
+ #
424
+
425
+ #<Location /server-info>
426
+
427
+ # SetHandler server-info
428
+
429
+ # Order deny,allow
430
+
431
+ # Deny from all
432
+
433
+ # Allow from .example.com
434
+
435
+ #</Location>
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+ #
446
+
447
+ # To enable a cache of proxied content, uncomment the following lines.
448
+
449
+ # See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
450
+
451
+ #
452
+
453
+ #<IfModule mod_disk_cache.c>
454
+
455
+ # CacheEnable disk /
456
+
457
+ # CacheRoot "/var/cache/mod_proxy"
458
+
459
+ #</IfModule>
460
+
461
+ #
462
+
463
+
464
+
465
+ #</IfModule>
466
+
467
+
324
468
 
325
469
  #
326
470
 

9

情報追加

2017/01/19 09:25

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -302,6 +302,60 @@
302
302
 
303
303
 
304
304
 
305
+ 【vim /etc/httpd/conf/httpd.conf】
306
+
307
+ ```
308
+
309
+ #
310
+
311
+ # Use name-based virtual hosting.
312
+
313
+ #
314
+
315
+ #NameVirtualHost *:80
316
+
317
+ #
318
+
319
+ # NOTE: NameVirtualHost cannot be used without a port specifier
320
+
321
+ # (e.g. :80) if mod_ssl is being used, due to the nature of the
322
+
323
+ # SSL protocol.
324
+
325
+ #
326
+
327
+
328
+
329
+ #
330
+
331
+ # VirtualHost example:
332
+
333
+ # Almost any Apache directive may go into a VirtualHost container.
334
+
335
+ # The first VirtualHost section is used for requests without a known
336
+
337
+ # server name.
338
+
339
+ #
340
+
341
+ #<VirtualHost *:80>
342
+
343
+ # ServerAdmin webmaster@dummy-host.example.com
344
+
345
+ # DocumentRoot /www/docs/dummy-host.example.com
346
+
347
+ # ServerName dummy-host.example.com
348
+
349
+ # ErrorLog logs/dummy-host.example.com-error_log
350
+
351
+ # CustomLog logs/dummy-host.example.com-access_log common
352
+
353
+ #</VirtualHost>
354
+
355
+ ```
356
+
357
+
358
+
305
359
  ###補足情報
306
360
 
307
361
  ・CentOS release 6.8 (Final)

8

情報追加

2017/01/19 09:15

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -307,3 +307,13 @@
307
307
  ・CentOS release 6.8 (Final)
308
308
 
309
309
  ・さくらのVPS
310
+
311
+
312
+
313
+ ※関係ないかもしれませんが、まず最初の段階ではapacheは表示されていました。
314
+
315
+ 次に無料のドメインを取得し、ネームサーバーに登録しました。
316
+
317
+ ここで、設定がよくわからなくなってしまったので、OSの再インストールをしました。
318
+
319
+ そして、ガイドにしたがい初期設定を行い今に至るといった感じです。

7

情報追加

2017/01/19 09:11

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -234,6 +234,26 @@
234
234
 
235
235
  ```ここに言語を入力
236
236
 
237
+ tcp 0 0 0.0.0.0:61203 0.0.0.0:* LIST
238
+
239
+ EN
240
+
241
+ tcp 0 0 127.0.0.1:25 0.0.0.0:* LIST
242
+
243
+ EN
244
+
245
+ tcp 0 0 :::80 :::* LIST
246
+
247
+ EN
248
+
249
+ tcp 0 0 :::61203 :::* LIST
250
+
251
+ EN
252
+
253
+ tcp 0 0 ::1:25 :::* LIST
254
+
255
+ EN
256
+
237
257
  unix 2 [ ACC ] STREAM LISTENING 9871 private/defer
238
258
 
239
259
  unix 2 [ ACC ] STREAM LISTENING 9875 private/trace

6

情報追加

2017/01/19 09:00

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -94,66 +94,6 @@
94
94
 
95
95
 
96
96
 
97
-
98
-
99
- ```
100
-
101
- Port 61203
102
-
103
- #AddressFamily any
104
-
105
- ListenAddress 0.0.0.0
106
-
107
- ListenAddress ::
108
-
109
-
110
-
111
- # Disable legacy (protocol version 1) support in the server for new
112
-
113
- # installations. In future the default will change to require explicit
114
-
115
- # activation of protocol 1
116
-
117
- Protocol 2
118
-
119
-
120
-
121
- # HostKey for protocol version 1
122
-
123
- #HostKey /etc/ssh/ssh_host_key
124
-
125
- # HostKeys for protocol version 2
126
-
127
- #HostKey /etc/ssh/ssh_host_rsa_key
128
-
129
- #HostKey /etc/ssh/ssh_host_dsa_key
130
-
131
-
132
-
133
- # Lifetime and size of ephemeral version 1 server key
134
-
135
- #KeyRegenerationInterval 1h
136
-
137
- #ServerKeyBits 1024
138
-
139
-
140
-
141
- # Logging
142
-
143
- # obsoletes QuietMode and FascistLogging
144
-
145
- #SyslogFacility AUTH
146
-
147
- SyslogFacility AUTHPRIV
148
-
149
- "/etc/ssh/sshd_config" 138L, 3875C
150
-
151
- ```
152
-
153
-
154
-
155
-
156
-
157
97
  【/etc/sysconfig/iptables】
158
98
 
159
99
  ```ここに言語を入力

5

情報追加

2017/01/19 08:59

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -290,6 +290,56 @@
290
290
 
291
291
 
292
292
 
293
+ 【netstat -na | grep LISTENコマンドの返答】
294
+
295
+ ```ここに言語を入力
296
+
297
+ unix 2 [ ACC ] STREAM LISTENING 9871 private/defer
298
+
299
+ unix 2 [ ACC ] STREAM LISTENING 9875 private/trace
300
+
301
+ unix 2 [ ACC ] STREAM LISTENING 9879 private/verify
302
+
303
+ unix 2 [ ACC ] STREAM LISTENING 9883 public/flush
304
+
305
+ unix 2 [ ACC ] STREAM LISTENING 9887 private/proxymap
306
+
307
+ unix 2 [ ACC ] STREAM LISTENING 9891 private/proxywrite
308
+
309
+ unix 2 [ ACC ] STREAM LISTENING 9895 private/smtp
310
+
311
+ unix 2 [ ACC ] STREAM LISTENING 9899 private/relay
312
+
313
+ unix 2 [ ACC ] STREAM LISTENING 9903 public/showq
314
+
315
+ unix 2 [ ACC ] STREAM LISTENING 9907 private/error
316
+
317
+ unix 2 [ ACC ] STREAM LISTENING 9911 private/retry
318
+
319
+ unix 2 [ ACC ] STREAM LISTENING 9915 private/discard
320
+
321
+ unix 2 [ ACC ] STREAM LISTENING 9919 private/local
322
+
323
+ unix 2 [ ACC ] STREAM LISTENING 9923 private/virtual
324
+
325
+ unix 2 [ ACC ] STREAM LISTENING 9927 private/lmtp
326
+
327
+ unix 2 [ ACC ] STREAM LISTENING 9931 private/anvil
328
+
329
+ unix 2 [ ACC ] STREAM LISTENING 9935 private/scache
330
+
331
+ unix 2 [ ACC ] STREAM LISTENING 10056 /var/run/fail2ban/fail2
332
+
333
+ ban.sock
334
+
335
+ unix 2 [ ACC ] STREAM LISTENING 7279 @/com/ubuntu/upstart
336
+
337
+ unix 2 [ ACC ] STREAM LISTENING 9469 /var/run/acpid.socket
338
+
339
+ unix 2 [ ACC ] STREAM LISTENING 9852 public/cleanup
340
+
341
+ ```
342
+
293
343
 
294
344
 
295
345
  ###補足情報

4

情報追加

2017/01/19 08:57

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -260,6 +260,32 @@
260
260
 
261
261
 
262
262
 
263
+ 【ps -ef | grep httpコマンドの返答】
264
+
265
+ ```ここに言語を入力
266
+
267
+ root 1405 1 0 15:45 ? 00:00:00 /usr/sbin/httpd
268
+
269
+ apache 1411 1405 0 15:45 ? 00:00:00 /usr/sbin/httpd
270
+
271
+ apache 1412 1405 0 15:45 ? 00:00:00 /usr/sbin/httpd
272
+
273
+ apache 1414 1405 0 15:45 ? 00:00:00 /usr/sbin/httpd
274
+
275
+ apache 1416 1405 0 15:45 ? 00:00:00 /usr/sbin/httpd
276
+
277
+ apache 1417 1405 0 15:45 ? 00:00:00 /usr/sbin/httpd
278
+
279
+ apache 1418 1405 0 15:45 ? 00:00:00 /usr/sbin/httpd
280
+
281
+ apache 1419 1405 0 15:45 ? 00:00:00 /usr/sbin/httpd
282
+
283
+ apache 1420 1405 0 15:45 ? 00:00:00 /usr/sbin/httpd
284
+
285
+ root 2027 1477 0 17:53 ttyS0 00:00:00 grep http
286
+
287
+ ```
288
+
263
289
 
264
290
 
265
291
 

3

情報追加

2017/01/19 08:55

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -257,3 +257,17 @@
257
257
  iptables: Applying firewall rules: [ OK ]
258
258
 
259
259
  ```
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+ ###補足情報
270
+
271
+ ・CentOS release 6.8 (Final)
272
+
273
+ ・さくらのVPS

2

追加

2017/01/19 08:51

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -220,7 +220,7 @@
220
220
 
221
221
 
222
222
 
223
-
223
+ vim /etc/sysconfig/iptables
224
224
 
225
225
  ```ここに言語を入力
226
226
 
@@ -230,7 +230,7 @@
230
230
 
231
231
  -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
232
232
 
233
- -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
233
+ -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT★★
234
234
 
235
235
  -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
236
236
 

1

追加

2017/01/19 07:59

投稿

s.k
s.k

スコア423

test CHANGED
File without changes
test CHANGED
@@ -211,3 +211,49 @@
211
211
  # Completed on Thu Jan 19 15:53:11 2017
212
212
 
213
213
  ```
214
+
215
+
216
+
217
+
218
+
219
+ ###追加
220
+
221
+
222
+
223
+
224
+
225
+ ```ここに言語を入力
226
+
227
+
228
+
229
+ ・・・・
230
+
231
+ -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
232
+
233
+ -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
234
+
235
+ -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
236
+
237
+ -A FORWARD -j REJECT --reject-with icmp-host-prohibited
238
+
239
+ ・・・・
240
+
241
+ ```
242
+
243
+
244
+
245
+
246
+
247
+ ②service iptables restart
248
+
249
+ ```ここに言語を入力
250
+
251
+ iptables: Setting chains to policy ACCEPT: filter [ OK ]
252
+
253
+ iptables: Flushing firewall rules: [ OK ]
254
+
255
+ iptables: Unloading modules: [ OK ]
256
+
257
+ iptables: Applying firewall rules: [ OK ]
258
+
259
+ ```