質問編集履歴
10
コード追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,6 +20,106 @@
|
|
20
20
|
|
21
21
|
```ここに言語を入力
|
22
22
|
|
23
|
+
~中略~
|
24
|
+
|
25
|
+
# least PidFile.
|
26
|
+
|
27
|
+
#
|
28
|
+
|
29
|
+
ServerRoot "/etc/httpd"
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
~中略~
|
34
|
+
|
35
|
+
#Listen 12.34.56.78:80
|
36
|
+
|
37
|
+
Listen 80
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
~中略~
|
42
|
+
|
43
|
+
#
|
44
|
+
|
45
|
+
Include conf.modules.d/*.conf
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
~中略~
|
50
|
+
|
51
|
+
#
|
52
|
+
|
53
|
+
User apache
|
54
|
+
|
55
|
+
Group apache
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
~中略~
|
60
|
+
|
61
|
+
# as error documents. e.g. admin@your-domain.com
|
62
|
+
|
63
|
+
#
|
64
|
+
|
65
|
+
ServerAdmin root@localhost
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
~中略~
|
70
|
+
|
71
|
+
#ServerName www.example.com:80
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
#
|
76
|
+
|
77
|
+
# Deny access to the entirety of your server's filesystem. You must
|
78
|
+
|
79
|
+
# explicitly permit access to web content directories in other
|
80
|
+
|
81
|
+
# <Directory> blocks below.
|
82
|
+
|
83
|
+
#
|
84
|
+
|
85
|
+
<Directory />
|
86
|
+
|
87
|
+
AllowOverride none
|
88
|
+
|
89
|
+
Require all denied
|
90
|
+
|
91
|
+
</Directory>
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
~中略~
|
96
|
+
|
97
|
+
#
|
98
|
+
|
99
|
+
#DocumentRoot "/var/www/html"
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
#
|
104
|
+
|
105
|
+
# Relax access to content within /var/www.
|
106
|
+
|
107
|
+
#
|
108
|
+
|
109
|
+
<Directory "/var/www">
|
110
|
+
|
111
|
+
AllowOverride All
|
112
|
+
|
113
|
+
# Allow open access:
|
114
|
+
|
115
|
+
Require all granted
|
116
|
+
|
117
|
+
</Directory>
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
23
123
|
<VirtualHost *:80>
|
24
124
|
|
25
125
|
DocumentRoot /var/www/html/hogehoge
|
@@ -28,7 +128,357 @@
|
|
28
128
|
|
29
129
|
</VirtualHost>
|
30
130
|
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
# Further relax access to the default document root:
|
138
|
+
|
139
|
+
|
140
|
+
|
31
|
-
|
141
|
+
<Directory "/var/www/html">
|
142
|
+
|
143
|
+
# or any combination of:
|
144
|
+
|
145
|
+
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
|
146
|
+
|
147
|
+
#
|
148
|
+
|
149
|
+
# Note that "MultiViews" must be named *explicitly* --- "Options All"
|
150
|
+
|
151
|
+
# doesn't give it to you.
|
152
|
+
|
153
|
+
#
|
154
|
+
|
155
|
+
# The Options directive is both complicated and important. Please see
|
156
|
+
|
157
|
+
# http://httpd.apache.org/docs/2.4/mod/core.html#options
|
158
|
+
|
159
|
+
# for more information.
|
160
|
+
|
161
|
+
#
|
162
|
+
|
163
|
+
Options Indexes FollowSymLinks
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
#
|
168
|
+
|
169
|
+
# AllowOverride controls what directives may be placed in .htaccess files.
|
170
|
+
|
171
|
+
# It can be "All", "None", or any combination of the keywords:
|
172
|
+
|
173
|
+
# Options FileInfo AuthConfig Limit
|
174
|
+
|
175
|
+
#
|
176
|
+
|
177
|
+
AllowOverride All
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
#
|
182
|
+
|
183
|
+
# Controls who can get stuff from this server.
|
184
|
+
|
185
|
+
#
|
186
|
+
|
187
|
+
Require all granted
|
188
|
+
|
189
|
+
</Directory>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
#
|
194
|
+
|
195
|
+
# DirectoryIndex: sets the file that Apache will serve if a directory
|
196
|
+
|
197
|
+
# is requested.
|
198
|
+
|
199
|
+
#
|
200
|
+
|
201
|
+
<IfModule dir_module>
|
202
|
+
|
203
|
+
DirectoryIndex index.html
|
204
|
+
|
205
|
+
</IfModule>
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
#
|
210
|
+
|
211
|
+
# The following lines prevent .htaccess and .htpasswd files from being
|
212
|
+
|
213
|
+
# viewed by Web clients.
|
214
|
+
|
215
|
+
#
|
216
|
+
|
217
|
+
<Files ".ht*">
|
218
|
+
|
219
|
+
Require all denied
|
220
|
+
|
221
|
+
#
|
222
|
+
|
223
|
+
# ErrorLog: The location of the error log file.
|
224
|
+
|
225
|
+
# If you do not specify an ErrorLog directive within a <VirtualHost>
|
226
|
+
|
227
|
+
# container, error messages relating to that virtual host will be
|
228
|
+
|
229
|
+
#
|
230
|
+
|
231
|
+
ErrorLog "logs/error_log"
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
#
|
236
|
+
|
237
|
+
# LogLevel: Control the number of messages logged to the error_log.
|
238
|
+
|
239
|
+
# Possible values include: debug, info, notice, warn, error, crit,
|
240
|
+
|
241
|
+
# alert, emerg.
|
242
|
+
|
243
|
+
#
|
244
|
+
|
245
|
+
LogLevel warn
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
<IfModule log_config_module>
|
250
|
+
|
251
|
+
#
|
252
|
+
|
253
|
+
# The following directives define some format nicknames for use with
|
254
|
+
|
255
|
+
# a CustomLog directive (see below).
|
256
|
+
|
257
|
+
#
|
258
|
+
|
259
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
<IfModule logio_module>
|
264
|
+
|
265
|
+
# You need to enable mod_logio.c to use %I and %O
|
266
|
+
|
267
|
+
</IfModule>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
#
|
272
|
+
|
273
|
+
# The location and format of the access logfile (Common Logfile Format).
|
274
|
+
|
275
|
+
# If you do not define any access logfiles within a <VirtualHost>
|
276
|
+
|
277
|
+
# container, they will be logged here. Contrariwise, if you *do*
|
278
|
+
|
279
|
+
# define per-<VirtualHost> access logfiles, transactions will be
|
280
|
+
|
281
|
+
# logged therein and *not* in this file.
|
282
|
+
|
283
|
+
#
|
284
|
+
|
285
|
+
#CustomLog "logs/access_log" common
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
#
|
290
|
+
|
291
|
+
# If you prefer a logfile with access, agent, and referer information
|
292
|
+
|
293
|
+
# (Combined Logfile Format) you can use the following directive.
|
294
|
+
|
295
|
+
#
|
296
|
+
|
297
|
+
CustomLog "logs/access_log" combined
|
298
|
+
|
299
|
+
</IfModule>
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
<IfModule alias_module>
|
304
|
+
|
305
|
+
~中略~
|
306
|
+
|
307
|
+
#
|
308
|
+
|
309
|
+
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
</IfModule>
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
#
|
318
|
+
|
319
|
+
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
|
320
|
+
|
321
|
+
# CGI directory exists, if you have that configured.
|
322
|
+
|
323
|
+
#
|
324
|
+
|
325
|
+
<Directory "/var/www/cgi-bin">
|
326
|
+
|
327
|
+
AllowOverride None
|
328
|
+
|
329
|
+
Options None
|
330
|
+
|
331
|
+
Require all granted
|
332
|
+
|
333
|
+
</Directory>
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
<IfModule mime_module>
|
338
|
+
|
339
|
+
#
|
340
|
+
|
341
|
+
# TypesConfig points to the file containing the list of mappings from
|
342
|
+
|
343
|
+
# filename extension to MIME-type.
|
344
|
+
|
345
|
+
#
|
346
|
+
|
347
|
+
TypesConfig /etc/mime.types
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
~中略~
|
352
|
+
|
353
|
+
AddType application/x-compress .Z
|
354
|
+
|
355
|
+
AddType application/x-gzip .gz .tgz
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
~中略~
|
360
|
+
|
361
|
+
AddType text/html .shtml
|
362
|
+
|
363
|
+
AddOutputFilter INCLUDES .shtml
|
364
|
+
|
365
|
+
</IfModule>
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
~中略~
|
370
|
+
|
371
|
+
AddDefaultCharset UTF-8
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
<IfModule mime_magic_module>
|
376
|
+
|
377
|
+
#
|
378
|
+
|
379
|
+
# The mod_mime_magic module allows the server to use various hints from the
|
380
|
+
|
381
|
+
# contents of the file itself to determine its type. The MIMEMagicFile
|
382
|
+
|
383
|
+
# directive tells the module where the hint definitions are located.
|
384
|
+
|
385
|
+
#
|
386
|
+
|
387
|
+
MIMEMagicFile conf/magic
|
388
|
+
|
389
|
+
</IfModule>
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
~中略~
|
394
|
+
|
395
|
+
# (You will also need to add "Includes" to the "Options" directive.)
|
396
|
+
|
397
|
+
#
|
398
|
+
|
399
|
+
AddType text/html .shtml
|
400
|
+
|
401
|
+
AddOutputFilter INCLUDES .shtml
|
402
|
+
|
403
|
+
</IfModule>
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
#
|
408
|
+
|
409
|
+
# Specify a default charset for all content served; this enables
|
410
|
+
|
411
|
+
# interpretation of all content as UTF-8 by default. To use the
|
412
|
+
|
413
|
+
# default browser choice (ISO-8859-1), or to allow the META tags
|
414
|
+
|
415
|
+
# in HTML content to override this choice, comment out this
|
416
|
+
|
417
|
+
# directive:
|
418
|
+
|
419
|
+
#
|
420
|
+
|
421
|
+
AddDefaultCharset UTF-8
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
<IfModule mime_magic_module>
|
426
|
+
|
427
|
+
#
|
428
|
+
|
429
|
+
# The mod_mime_magic module allows the server to use various hints from the
|
430
|
+
|
431
|
+
# contents of the file itself to determine its type. The MIMEMagicFile
|
432
|
+
|
433
|
+
# directive tells the module where the hint definitions are located.
|
434
|
+
|
435
|
+
#
|
436
|
+
|
437
|
+
MIMEMagicFile conf/magic
|
438
|
+
|
439
|
+
</IfModule>
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
#
|
444
|
+
|
445
|
+
# Customizable error responses come in three flavors:
|
446
|
+
|
447
|
+
# 1) plain text 2) local redirects 3) external redirects
|
448
|
+
|
449
|
+
#
|
450
|
+
|
451
|
+
# Some examples:
|
452
|
+
|
453
|
+
#ErrorDocument 500 "The server made a boo boo."
|
454
|
+
|
455
|
+
#ErrorDocument 404 /missing.html
|
456
|
+
|
457
|
+
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
|
458
|
+
|
459
|
+
#ErrorDocument 402 http://www.example.com/subscription_info.html
|
460
|
+
|
461
|
+
#
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
~中略~
|
466
|
+
|
467
|
+
#EnableMMAP off
|
468
|
+
|
469
|
+
EnableSendfile on
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
# Supplemental configuration
|
474
|
+
|
475
|
+
#
|
476
|
+
|
477
|
+
# Load config files in the "/etc/httpd/conf.d" directory, if any.
|
478
|
+
|
479
|
+
IncludeOptional conf.d/*.conf
|
480
|
+
|
481
|
+
|
32
482
|
|
33
483
|
```
|
34
484
|
|
9
文言
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
■やったこと
|
18
18
|
|
19
|
-
|
19
|
+
httpd.confに記載した内容です。
|
20
20
|
|
21
21
|
```ここに言語を入力
|
22
22
|
|
8
文言変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,53 +18,21 @@
|
|
18
18
|
|
19
19
|
|
20
20
|
|
21
|
-
httpd.confに下記を追加
|
22
|
-
|
23
21
|
```ここに言語を入力
|
24
22
|
|
25
|
-
NameVirtualHost *:10022
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
<VirtualHost *:
|
23
|
+
<VirtualHost *:80>
|
30
|
-
|
31
|
-
|
32
24
|
|
33
25
|
DocumentRoot /var/www/html/hogehoge
|
34
26
|
|
35
|
-
|
36
|
-
|
37
27
|
ServerName hogehoge.com
|
38
28
|
|
39
|
-
|
40
|
-
|
41
|
-
ServerAlias www.hogehoge.com
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
<Directory "/var/www/html/hogehoge">
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
AllowOverride All
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</Directory>
|
54
|
-
|
55
|
-
|
56
|
-
|
57
29
|
</VirtualHost>
|
58
|
-
|
59
|
-
```
|
60
|
-
|
61
|
-
・コメントアウト
|
62
|
-
|
63
|
-
```ここに言語を入力
|
64
30
|
|
65
31
|
#DocumentRoot "/var/www/html"
|
66
32
|
|
67
33
|
```
|
34
|
+
|
35
|
+
|
68
36
|
|
69
37
|
|
70
38
|
|
7
文言追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -7,6 +7,10 @@
|
|
7
7
|
hogehoge.comでサイトを表示させたい。
|
8
8
|
|
9
9
|
|
10
|
+
|
11
|
+
■apacheのversion
|
12
|
+
|
13
|
+
Apache/2.4.6 (CentOS)
|
10
14
|
|
11
15
|
|
12
16
|
|
6
syusei
test
CHANGED
File without changes
|
test
CHANGED
@@ -88,7 +88,7 @@
|
|
88
88
|
|
89
89
|
RewriteCond %{REQUEST_FILENAME} !-d
|
90
90
|
|
91
|
-
RewriteRule . /
|
91
|
+
RewriteRule . /hogehoge/index.php [L]
|
92
92
|
|
93
93
|
</IfModule>
|
94
94
|
|
5
文言変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -56,9 +56,49 @@
|
|
56
56
|
|
57
57
|
・コメントアウト
|
58
58
|
|
59
|
+
```ここに言語を入力
|
60
|
+
|
59
61
|
#DocumentRoot "/var/www/html"
|
60
62
|
|
63
|
+
```
|
61
64
|
|
65
|
+
|
66
|
+
|
67
|
+
■その他
|
68
|
+
|
69
|
+
関係ないかもですが、/var/www/html/hogehoge/.htaccessファイルの
|
70
|
+
|
71
|
+
コードです。
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
```ここに言語を入力
|
76
|
+
|
77
|
+
# BEGIN WordPress
|
78
|
+
|
79
|
+
<IfModule mod_rewrite.c>
|
80
|
+
|
81
|
+
RewriteEngine On
|
82
|
+
|
83
|
+
RewriteBase /hogehoge/
|
84
|
+
|
85
|
+
RewriteRule ^index\.php$ - [L]
|
86
|
+
|
87
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
88
|
+
|
89
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
90
|
+
|
91
|
+
RewriteRule . /akkin01/index.php [L]
|
92
|
+
|
93
|
+
</IfModule>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
# END WordPress
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
```
|
62
102
|
|
63
103
|
■現状
|
64
104
|
|
4
追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -53,6 +53,10 @@
|
|
53
53
|
</VirtualHost>
|
54
54
|
|
55
55
|
```
|
56
|
+
|
57
|
+
・コメントアウト
|
58
|
+
|
59
|
+
#DocumentRoot "/var/www/html"
|
56
60
|
|
57
61
|
|
58
62
|
|
3
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -78,4 +78,48 @@
|
|
78
78
|
|
79
79
|
|
80
80
|
|
81
|
+
|
82
|
+
|
83
|
+
■httpd -Sで確認した実行結果
|
84
|
+
|
85
|
+
VirtualHost configuration:
|
86
|
+
|
87
|
+
```ここに言語を入力
|
88
|
+
|
89
|
+
*:80 hogehoge.com (/etc/httpd/conf/httpd.conf:131)
|
90
|
+
|
91
|
+
ServerRoot: "/etc/httpd"
|
92
|
+
|
93
|
+
Main DocumentRoot: "/var/www/html"
|
94
|
+
|
95
|
+
Main ErrorLog: "/etc/httpd/logs/error_log"
|
96
|
+
|
97
|
+
Mutex authdigest-opaque: using_defaults
|
98
|
+
|
99
|
+
Mutex proxy-balancer-shm: using_defaults
|
100
|
+
|
101
|
+
Mutex rewrite-map: using_defaults
|
102
|
+
|
103
|
+
Mutex authdigest-client: using_defaults
|
104
|
+
|
105
|
+
Mutex proxy: using_defaults
|
106
|
+
|
107
|
+
Mutex authn-socache: using_defaults
|
108
|
+
|
109
|
+
Mutex default: dir="/run/httpd/" mechanism=default
|
110
|
+
|
111
|
+
Mutex mpm-accept: using_defaults
|
112
|
+
|
113
|
+
PidFile: "/run/httpd/httpd.pid"
|
114
|
+
|
115
|
+
Define: DUMP_VHOSTS
|
116
|
+
|
117
|
+
Define: DUMP_RUN_CFG
|
118
|
+
|
119
|
+
```
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
81
125
|
どうすればhogehoge.comで表示できるのかご教示頂ければありがたいです。
|
2
リンクにした
test
CHANGED
File without changes
|
test
CHANGED
@@ -74,7 +74,7 @@
|
|
74
74
|
|
75
75
|
|
76
76
|
|
77
|
-
http://www.xn--vps-073b3a72a.com/9.html
|
77
|
+
[http://www.xn--vps-073b3a72a.com/9.html](http://www.xn--vps-073b3a72a.com/9.html)
|
78
78
|
|
79
79
|
|
80
80
|
|
1
サイトを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -70,4 +70,12 @@
|
|
70
70
|
|
71
71
|
|
72
72
|
|
73
|
+
■参考にしたサイト
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
http://www.xn--vps-073b3a72a.com/9.html
|
78
|
+
|
79
|
+
|
80
|
+
|
73
81
|
どうすればhogehoge.comで表示できるのかご教示頂ければありがたいです。
|