回答編集履歴
2
イメージの書き換え
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
```ここに言語を入力
|
6
6
|
|
7
|
-
User --->
|
7
|
+
User ---> http://hogehoge.com/IP/hoge/ ----> http://hoge.com/)
|
8
8
|
|
9
9
|
```
|
10
10
|
|
@@ -12,15 +12,15 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
-
|
15
|
+
hogehoge.comとhoge.comは同じマシンでIPを2個もっている。(前者)
|
16
16
|
|
17
|
-
もしくは
|
17
|
+
もしくはhogehoge.comとhoge.comは別マシン(後者)
|
18
18
|
|
19
19
|
|
20
20
|
|
21
|
-
前者であれば
|
21
|
+
前者であれば、IPベースのIP ベースのバーチャルホスト設定になります。
|
22
22
|
|
23
|
-
後者であれば
|
23
|
+
後者であれば mod_proxy
|
24
24
|
|
25
25
|
|
26
26
|
|
1
バーチャルドメインの定義を追加しました。
test
CHANGED
@@ -21,3 +21,79 @@
|
|
21
21
|
前者であれば mod_proxy
|
22
22
|
|
23
23
|
後者であれば、IPベースのIP ベースのバーチャルホスト設定になります。
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
IPベースバーチャルホスト
|
28
|
+
|
29
|
+
```ここに言語を入力
|
30
|
+
|
31
|
+
<VirtualHost xxx.xxx.xxx.xxx>
|
32
|
+
|
33
|
+
ServerAdmin webmaster@mail.smallco.com
|
34
|
+
|
35
|
+
DocumentRoot /groups/smallco/www
|
36
|
+
|
37
|
+
ServerName www.smallco.com
|
38
|
+
|
39
|
+
ErrorLog /groups/smallco/logs/error_log
|
40
|
+
|
41
|
+
TransferLog /groups/smallco/logs/access_log
|
42
|
+
|
43
|
+
</VirtualHost>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
<VirtualHost yyy.yyy.yyy.yyy>
|
48
|
+
|
49
|
+
ServerAdmin webmaster@mail.baygroup.org
|
50
|
+
|
51
|
+
DocumentRoot /groups/baygroup/www
|
52
|
+
|
53
|
+
ServerName www.baygroup.org
|
54
|
+
|
55
|
+
ErrorLog /groups/baygroup/logs/error_log
|
56
|
+
|
57
|
+
TransferLog /groups/baygroup/logs/access_log
|
58
|
+
|
59
|
+
</VirtualHost>
|
60
|
+
|
61
|
+
```
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
ネームベースバーチャルホスト(IPが1つの場合)
|
66
|
+
|
67
|
+
(ただし、DNSで1つのIPに複数ドメインでアクセスがくる場合)
|
68
|
+
|
69
|
+
```ここに言語を入力
|
70
|
+
|
71
|
+
NameVirtualHost *:80
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
<VirtualHost *:80>
|
76
|
+
|
77
|
+
ServerName www.domain.tld
|
78
|
+
|
79
|
+
ServerAlias domain.tld *.domain.tld
|
80
|
+
|
81
|
+
DocumentRoot /www/domain
|
82
|
+
|
83
|
+
</VirtualHost>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
<VirtualHost *:80>
|
88
|
+
|
89
|
+
ServerName www.otherdomain.tld
|
90
|
+
|
91
|
+
ServerAlias otherdomain.tld *.otherdomain.tld
|
92
|
+
|
93
|
+
DocumentRoot /www/otherdomain
|
94
|
+
|
95
|
+
</VirtualHost>
|
96
|
+
|
97
|
+
```
|
98
|
+
|
99
|
+
|