質問編集履歴

2

追記

2020/10/11 04:29

投稿

Res
Res

スコア184

test CHANGED
File without changes
test CHANGED
@@ -55,3 +55,79 @@
55
55
  |:--:|:--:|:--:|:--:|
56
56
 
57
57
  |CentOS7|PHP7|Apache|さくらのVPS|
58
+
59
+
60
+
61
+ httpd -Sによる結果(ドメイン名は変更)
62
+
63
+ ```text
64
+
65
+ AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/httpd.conf:353
66
+
67
+ AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
68
+
69
+ VirtualHost configuration:
70
+
71
+ *:80 is a NameVirtualHost
72
+
73
+ default server example.org (/etc/httpd/conf/httpd.conf:355)
74
+
75
+ port 80 namevhost example.org (/etc/httpd/conf/httpd.conf:355)
76
+
77
+ port 80 namevhost sub.example.org (/etc/httpd/conf/httpd.conf:364)
78
+
79
+ *:443 is a NameVirtualHost
80
+
81
+ default server localhost.localdomain (/etc/httpd/conf.d/ssl.conf:56)
82
+
83
+ port 443 namevhost localhost.localdomain (/etc/httpd/conf.d/ssl.conf:56)
84
+
85
+ port 443 namevhost example.org (/etc/httpd/conf/httpd-le-ssl.conf:2)
86
+
87
+ alias sub.example.org
88
+
89
+ ServerRoot: "/etc/httpd"
90
+
91
+ Main DocumentRoot: "/var/www/html"
92
+
93
+ Main ErrorLog: "/etc/httpd/logs/error_log"
94
+
95
+ Mutex proxy: using_defaults
96
+
97
+ Mutex authn-socache: using_defaults
98
+
99
+ Mutex ssl-cache: using_defaults
100
+
101
+ Mutex default: dir="/run/httpd/" mechanism=default
102
+
103
+ Mutex mpm-accept: using_defaults
104
+
105
+ Mutex authdigest-opaque: using_defaults
106
+
107
+ Mutex proxy-balancer-shm: using_defaults
108
+
109
+ Mutex rewrite-map: using_defaults
110
+
111
+ Mutex authdigest-client: using_defaults
112
+
113
+ Mutex ssl-stapling: using_defaults
114
+
115
+ PidFile: "/run/httpd/httpd.pid"
116
+
117
+ Define: _RH_HAS_HTTPPROTOCOLOPTIONS
118
+
119
+ Define: DUMP_VHOSTS
120
+
121
+ Define: DUMP_RUN_CFG
122
+
123
+ User: name="apache" id=48
124
+
125
+ Group: name="apache" id=48
126
+
127
+
128
+
129
+ ```
130
+
131
+
132
+
133
+ また、httpd.conf編集後はsystemctl restart httpd で再起動を行っています。

1

読みやすいよう変更

2020/10/11 04:29

投稿

Res
Res

スコア184

test CHANGED
File without changes
test CHANGED
@@ -1,12 +1,12 @@
1
1
  LinuxでApacheを使用して独自ドメインからサブドメインの作成を行いたいのですが、うまくサブドメインのディレクトリを指定することができません。
2
2
 
3
- さくらのVPSで行っているのですが、ドメインのエントリ追加でサブドメインを追加したのですがそのサブドメインでアクセスするともちろんですがサブドメインなしと同じ結果が返ってきてしまいます。
3
+ さくらのVPSで行っているのですが、ドメインのエントリ追加でサブドメインを追加したのですがそのサブドメインでアクセスするとサブドメインなしの時と同じ結果が返ってきてしまいます。
4
4
 
5
5
  ![サブドメインのエントリを追加した画像](5b593dc15503992a1def7264b9ae097d.png)
6
6
 
7
7
  (画像ではsub domainですが、実際はsubです。)
8
8
 
9
- 説明が下手ですみませんが、example.org/でhtml/index.htmlが表示される場合、sub.example.org/でもhtml/index.htmlが返ってきてしまうので、
9
+ example.org/でhtml/index.htmlが表示される場合、sub.example.org/でもhtml/index.htmlが返ってきてしまうので、
10
10
 
11
11
  |ドメイン|ディレクトリ|
12
12
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
 
21
- のように変更したいのですが、うまくせん
21
+ のように変更したいと思っていま
22
22
 
23
23
  httpd.confに、
24
24
 
@@ -44,7 +44,7 @@
44
44
 
45
45
 
46
46
 
47
- サブドメインのディレクトリの指定方法がわか方は、お願いたします。
47
+ サブドメインのディレクトリの指定方法について、ご教示頂けと幸す。
48
48
 
49
49
 
50
50