回答編集履歴

2

イメージの書き換え

2016/11/14 13:46

投稿

nagaetty
nagaetty

スコア1106

test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ```ここに言語を入力
6
6
 
7
- User ---> XXXX ----> IP:(http://YYY/)
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
- XXXXYYYは同じマシンでIPを2もっている。(前者)
15
+ hogehoge.comhoge.comは同じマシンでIPを2もっている。(前者)
16
16
 
17
- もしくはXXXYYYは別マシン(後者)
17
+ もしくはhogehoge.comhoge.comは別マシン(後者)
18
18
 
19
19
 
20
20
 
21
- 前者であれば mod_proxy
21
+ 前者であれば、IPベースのIP ベースのバーチャルホスト設定になります。
22
22
 
23
- 後者であれば、IPベースのIP ベースのバーチャルホスト設定になります。
23
+ 後者であれば mod_proxy
24
24
 
25
25
 
26
26
 

1

バーチャルドメインの定義を追加しました。

2016/11/14 13:46

投稿

nagaetty
nagaetty

スコア1106

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
+