質問編集履歴
3
コードブロックに変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -44,7 +44,547 @@
|
|
44
44
|
|
45
45
|
↓↓↓↓↓↓↓
|
46
46
|
|
47
|
+
|
48
|
+
|
49
|
+
```ここに言語を入力
|
50
|
+
|
51
|
+
中略
|
52
|
+
|
53
|
+
#
|
54
|
+
|
55
|
+
ServerRoot "/etc/httpd"
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
#
|
60
|
+
|
61
|
+
# Listen: Allows you to bind Apache to specific IP addresses and/or
|
62
|
+
|
63
|
+
# ports, instead of the default. See also the <VirtualHost>
|
64
|
+
|
65
|
+
# directive.
|
66
|
+
|
67
|
+
#
|
68
|
+
|
69
|
+
# Change this to Listen on specific IP addresses as shown below to
|
70
|
+
|
71
|
+
# prevent Apache from glomming onto all bound IP addresses.
|
72
|
+
|
73
|
+
#
|
74
|
+
|
75
|
+
#Listen 12.34.56.78:80
|
76
|
+
|
77
|
+
Listen 80
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
#
|
82
|
+
|
83
|
+
# Dynamic Shared Object (DSO) Support
|
84
|
+
|
85
|
+
#
|
86
|
+
|
87
|
+
# To be able to use the functionality of a module which was built as a DSO you
|
88
|
+
|
89
|
+
# have to place corresponding `LoadModule' lines at this location so the
|
90
|
+
|
91
|
+
# directives contained in it are actually available _before_ they are used.
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
中略
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
#
|
100
|
+
|
101
|
+
# ServerRoot: The top of the directory tree under which the server's
|
102
|
+
|
103
|
+
# configuration, error, and log files are kept.
|
104
|
+
|
105
|
+
#
|
106
|
+
|
107
|
+
# Do not add a slash at the end of the directory path. If you point
|
108
|
+
|
109
|
+
# ServerRoot at a non-local disk, be sure to specify a local disk on the
|
110
|
+
|
111
|
+
# Mutex directive, if file-based mutexes are used. If you wish to share the
|
112
|
+
|
113
|
+
# same ServerRoot for multiple httpd daemons, you will need to change at
|
114
|
+
|
115
|
+
# least PidFile.
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
#
|
120
|
+
|
121
|
+
ServerRoot "/etc/httpd"
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
#
|
126
|
+
|
127
|
+
# Listen: Allows you to bind Apache to specific IP addresses and/or
|
128
|
+
|
129
|
+
# ports, instead of the default. See also the <VirtualHost>
|
130
|
+
|
131
|
+
# directive.
|
132
|
+
|
133
|
+
#
|
134
|
+
|
135
|
+
# Change this to Listen on specific IP addresses as shown below to
|
136
|
+
|
137
|
+
# prevent Apache from glomming onto all bound IP addresses.
|
138
|
+
|
139
|
+
#
|
140
|
+
|
141
|
+
#Listen 12.34.56.78:80
|
142
|
+
|
143
|
+
Listen 80
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
中略
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
Include conf.modules.d/*.conf
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
#
|
156
|
+
|
157
|
+
# If you wish httpd to run as a different user or group, you must run
|
158
|
+
|
159
|
+
# httpd as root initially and it will switch.
|
160
|
+
|
161
|
+
#
|
162
|
+
|
163
|
+
# User/Group: The name (or #number) of the user/group to run httpd as.
|
164
|
+
|
165
|
+
# It is usually good practice to create a dedicated user and group for
|
166
|
+
|
167
|
+
# running httpd, as with most system services.
|
168
|
+
|
169
|
+
#
|
170
|
+
|
171
|
+
User apache
|
172
|
+
|
173
|
+
Group apache
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
中略
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
#
|
182
|
+
|
183
|
+
# ServerAdmin: Your address, where problems with the server should be
|
184
|
+
|
185
|
+
# e-mailed. This address appears on some server-generated pages, such
|
186
|
+
|
187
|
+
# as error documents. e.g. admin@your-domain.com
|
188
|
+
|
189
|
+
#
|
190
|
+
|
191
|
+
ServerAdmin root@localhost
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
#
|
196
|
+
|
197
|
+
# ServerName gives the name and port that the server uses to identify itself.
|
198
|
+
|
199
|
+
# This can often be determined automatically, but we recommend you specify
|
200
|
+
|
201
|
+
# it explicitly to prevent problems during startup.
|
202
|
+
|
203
|
+
# If your host doesn't have a registered DNS name, enter its IP address here.
|
204
|
+
|
205
|
+
#
|
206
|
+
|
207
|
+
#ServerName www.example.com:80
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
#
|
212
|
+
|
213
|
+
# Deny access to the entirety of your server's filesystem. You must
|
214
|
+
|
215
|
+
# explicitly permit access to web content directories in other
|
216
|
+
|
217
|
+
# <Directory> blocks below.
|
218
|
+
|
219
|
+
#
|
220
|
+
|
221
|
+
<Directory />
|
222
|
+
|
223
|
+
AllowOverride none
|
224
|
+
|
225
|
+
Require all denied
|
226
|
+
|
227
|
+
</Directory>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
#
|
232
|
+
|
233
|
+
# Note that from this point forward you must specifically allow
|
234
|
+
|
235
|
+
# particular features to be enabled - so if something's not working as
|
236
|
+
|
237
|
+
# you might expect, make sure that you have specifically enabled it
|
238
|
+
|
239
|
+
# below.
|
240
|
+
|
241
|
+
#
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
#
|
246
|
+
|
247
|
+
# DocumentRoot: The directory out of which you will serve your
|
248
|
+
|
249
|
+
# documents. By default, all requests are taken from this directory, but
|
250
|
+
|
251
|
+
# symbolic links and aliases may be used to point to other locations.
|
252
|
+
|
253
|
+
#
|
254
|
+
|
255
|
+
DocumentRoot "/var/www/html"
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
#
|
260
|
+
|
261
|
+
# Relax access to content within /var/www.
|
262
|
+
|
263
|
+
#
|
264
|
+
|
265
|
+
<Directory "/var/www">
|
266
|
+
|
267
|
+
AllowOverride All
|
268
|
+
|
269
|
+
# Allow open access:
|
270
|
+
|
271
|
+
Require all granted
|
272
|
+
|
273
|
+
</Directory>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
# Further relax access to the default document root:
|
278
|
+
|
279
|
+
DocumentRoot "/var/www/html"
|
280
|
+
|
281
|
+
<Directory "/var/www/html">
|
282
|
+
|
283
|
+
# or any combination of:
|
284
|
+
|
285
|
+
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
|
286
|
+
|
287
|
+
#
|
288
|
+
|
289
|
+
# Note that "MultiViews" must be named *explicitly* --- "Options All"
|
290
|
+
|
291
|
+
# doesn't give it to you.
|
292
|
+
|
293
|
+
#
|
294
|
+
|
295
|
+
# The Options directive is both complicated and important. Please see
|
296
|
+
|
47
|
-
http
|
297
|
+
# http://httpd.apache.org/docs/2.4/mod/core.html#options
|
298
|
+
|
299
|
+
# for more information.
|
300
|
+
|
301
|
+
#
|
302
|
+
|
303
|
+
Options Indexes FollowSymLinks
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
#
|
308
|
+
|
309
|
+
#
|
310
|
+
|
311
|
+
# AllowOverride controls what directives may be placed in .htaccess files.
|
312
|
+
|
313
|
+
# It can be "All", "None", or any combination of the keywords:
|
314
|
+
|
315
|
+
# Options FileInfo AuthConfig Limit
|
316
|
+
|
317
|
+
#
|
318
|
+
|
319
|
+
AllowOverride All
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
#
|
324
|
+
|
325
|
+
# Controls who can get stuff from this server.
|
326
|
+
|
327
|
+
#
|
328
|
+
|
329
|
+
Require all granted
|
330
|
+
|
331
|
+
</Directory>
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
#
|
336
|
+
|
337
|
+
# DirectoryIndex: sets the file that Apache will serve if a directory
|
338
|
+
|
339
|
+
# is requested.
|
340
|
+
|
341
|
+
#
|
342
|
+
|
343
|
+
<IfModule dir_module>
|
344
|
+
|
345
|
+
DirectoryIndex index.html
|
346
|
+
|
347
|
+
</IfModule>
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
#
|
352
|
+
|
353
|
+
# The following lines prevent .htaccess and .htpasswd files from being
|
354
|
+
|
355
|
+
# viewed by Web clients.
|
356
|
+
|
357
|
+
#
|
358
|
+
|
359
|
+
<Files ".ht*">
|
360
|
+
|
361
|
+
Require all denied
|
362
|
+
|
363
|
+
</Files>
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
中略
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
LogLevel warn
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
<IfModule log_config_module>
|
376
|
+
|
377
|
+
#
|
378
|
+
|
379
|
+
# The following directives define some format nicknames for use with
|
380
|
+
|
381
|
+
# a CustomLog directive (see below).
|
382
|
+
|
383
|
+
#
|
384
|
+
|
385
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
386
|
+
|
387
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
<IfModule logio_module>
|
392
|
+
|
393
|
+
# You need to enable mod_logio.c to use %I and %O
|
394
|
+
|
395
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
396
|
+
|
397
|
+
</IfModule>
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
#
|
402
|
+
|
403
|
+
# The location and format of the access logfile (Common Logfile Format).
|
404
|
+
|
405
|
+
# If you do not define any access logfiles within a <VirtualHost>
|
406
|
+
|
407
|
+
# container, they will be logged here. Contrariwise, if you *do*
|
408
|
+
|
409
|
+
# define per-<VirtualHost> access logfiles, transactions will be
|
410
|
+
|
411
|
+
# logged therein and *not* in this file.
|
412
|
+
|
413
|
+
#
|
414
|
+
|
415
|
+
#CustomLog "logs/access_log" common
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
#
|
420
|
+
|
421
|
+
# If you prefer a logfile with access, agent, and referer information
|
422
|
+
|
423
|
+
# (Combined Logfile Format) you can use the following directive.
|
424
|
+
|
425
|
+
#
|
426
|
+
|
427
|
+
CustomLog "logs/access_log" combined
|
428
|
+
|
429
|
+
</IfModule>
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
<IfModule alias_module>
|
434
|
+
|
435
|
+
#
|
436
|
+
|
437
|
+
# Redirect: Allows you to tell clients about documents that used to
|
438
|
+
|
439
|
+
# exist in your server's namespace, but do not anymore. The client
|
440
|
+
|
441
|
+
# will make a new request for the document at its new location.
|
442
|
+
|
443
|
+
# Example:
|
444
|
+
|
445
|
+
# Redirect permanent /foo http://www.example.com/bar
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
#
|
450
|
+
|
451
|
+
# Alias: Maps web paths into filesystem paths and is used to
|
452
|
+
|
453
|
+
# access content that does not live under the DocumentRoot.
|
454
|
+
|
455
|
+
# Example:
|
456
|
+
|
457
|
+
# Alias /webpath /full/filesystem/path
|
458
|
+
|
459
|
+
#
|
460
|
+
|
461
|
+
# If you include a trailing / on /webpath then the server will
|
462
|
+
|
463
|
+
# require it to be present in the URL. You will also likely
|
464
|
+
|
465
|
+
# need to provide a <Directory> section to allow access to
|
466
|
+
|
467
|
+
# the filesystem path.
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
中略
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
#
|
476
|
+
|
477
|
+
<Directory "/var/www/cgi-bin">
|
478
|
+
|
479
|
+
AllowOverride None
|
480
|
+
|
481
|
+
Options None
|
482
|
+
|
483
|
+
Require all granted
|
484
|
+
|
485
|
+
</Directory>
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
<IfModule mime_module>
|
490
|
+
|
491
|
+
#
|
492
|
+
|
493
|
+
# TypesConfig points to the file containing the list of mappings from
|
494
|
+
|
495
|
+
# filename extension to MIME-type.
|
496
|
+
|
497
|
+
#
|
498
|
+
|
499
|
+
TypesConfig /etc/mime.types
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
#
|
504
|
+
|
505
|
+
# AddType allows you to add to or override the MIME configuration
|
506
|
+
|
507
|
+
# file specified in TypesConfig for specific file types.
|
508
|
+
|
509
|
+
#
|
510
|
+
|
511
|
+
#AddType application/x-gzip .tgz
|
512
|
+
|
513
|
+
#
|
514
|
+
|
515
|
+
# AddEncoding allows you to have certain browsers uncompress
|
516
|
+
|
517
|
+
# information on the fly. Note: Not all browsers support this.
|
518
|
+
|
519
|
+
#
|
520
|
+
|
521
|
+
#AddEncoding x-compress .Z
|
522
|
+
|
523
|
+
#AddEncoding x-gzip .gz .tgz
|
524
|
+
|
525
|
+
#
|
526
|
+
|
527
|
+
# If the AddEncoding directives above are commented-out, then you
|
528
|
+
|
529
|
+
# probably should define those extensions to indicate media types:
|
530
|
+
|
531
|
+
#
|
532
|
+
|
533
|
+
AddType application/x-compress .Z
|
534
|
+
|
535
|
+
AddType application/x-gzip .gz .tgz
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
中略
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
# in HTML content to override this choice, comment out this
|
544
|
+
|
545
|
+
# directive:
|
546
|
+
|
547
|
+
#
|
548
|
+
|
549
|
+
AddDefaultCharset UTF-8
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
<IfModule mime_magic_module>
|
554
|
+
|
555
|
+
#
|
556
|
+
|
557
|
+
# The mod_mime_magic module allows the server to use various hints from the
|
558
|
+
|
559
|
+
# contents of the file itself to determine its type. The MIMEMagicFile
|
560
|
+
|
561
|
+
# directive tells the module where the hint definitions are located.
|
562
|
+
|
563
|
+
#
|
564
|
+
|
565
|
+
MIMEMagicFile conf/magic
|
566
|
+
|
567
|
+
</IfModule>
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
中略
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
EnableSendfile on
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
# Supplemental configuration
|
580
|
+
|
581
|
+
#
|
582
|
+
|
583
|
+
# Load config files in the "/etc/httpd/conf.d" directory, if any.
|
584
|
+
|
585
|
+
IncludeOptional conf.d/*.conf
|
586
|
+
|
587
|
+
```
|
48
588
|
|
49
589
|
|
50
590
|
|
2
httpd\.confファイルのコードを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,4 +38,16 @@
|
|
38
38
|
|
39
39
|
|
40
40
|
|
41
|
+
追記:
|
42
|
+
|
43
|
+
現在のhttpd.confのコードです。
|
44
|
+
|
45
|
+
↓↓↓↓↓↓↓
|
46
|
+
|
47
|
+
https://www.evernote.com/shard/s25/sh/82a7a0ab-9ad9-4691-937d-db2ac16c30cf/9b849b940eaf2840d403a8bf3d4d8f8d
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
41
53
|
以上ご教示いただければありがたいです。
|
1
誤字修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
example.comというドメインを取得し、
|
6
6
|
|
7
|
-
www/html/hogehogeにWordPressを設置しました。
|
7
|
+
サーバーの"www/html/hogehoge"内にWordPressを設置しました。
|
8
8
|
|
9
9
|
|
10
10
|
|
@@ -18,11 +18,13 @@
|
|
18
18
|
|
19
19
|
example.comで
|
20
20
|
|
21
|
-
WordPressにアクセスできるように設定したいです。
|
21
|
+
WordPressのサイトにアクセスできるように設定したいです。
|
22
22
|
|
23
23
|
|
24
24
|
|
25
25
|
ついてはどのようにDocumentRootを設定すればいいでしょうか?
|
26
|
+
|
27
|
+
DNSは設定済みです。
|
26
28
|
|
27
29
|
|
28
30
|
|