teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

httpd\.conf 追記

2017/03/31 03:31

投稿

lazhuward
lazhuward

スコア1294

answer CHANGED
@@ -2,4 +2,29 @@
2
2
  VirtualHost設定の下にDocumentRootの設定があるのではないでしょうか。
3
3
 
4
4
  それかアクセスできなくてErrorページが表示されているとかはないですか?
5
- access_log や error_log を見てみると良いかと思います。
5
+ access_log や error_log を見てみると良いかと思います。
6
+
7
+ ----
8
+
9
+ 以下のようにDirectoryを追記してみてください。
10
+
11
+ ```conf:httpd.conf
12
+ NameVirtualHost *:80
13
+
14
+ <VirtualHost *:80>
15
+
16
+ DocumentRoot /home/xxxx
17
+ ServerName xxxx.com
18
+ ServerAlias www.xxxx.com
19
+
20
+ <Directory "/home/xxxx">
21
+ AllowOverride All
22
+ </Directory>
23
+
24
+ </VirtualHost>
25
+ ```
26
+
27
+ ちなみに httpd.conf を修正するより、
28
+ virtualhost.conf とかで保存したファイルを
29
+ ```/etc/httpd/conf.d``` に放り込んだほうが良いかと思います。
30
+ #httpd.conf から Include されています。