質問編集履歴
2
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -13,4 +13,40 @@
|
|
13
13
|
/errors や /hoge の中にファイルを入れたら問題なく表示されるのに、/error の中に入れると表示されなくなるのも謎です。
|
14
14
|
httpd.confで指定したディレクトリは特別な扱いになるということ…?
|
15
15
|
|
16
|
-
404ページを表示されたいのですがどうすれば良いでしょうか?
|
16
|
+
404ページを表示されたいのですがどうすれば良いでしょうか?
|
17
|
+
|
18
|
+
追記
|
19
|
+
|
20
|
+
参考までに、httpd.confと.htaccessの記述内容を下記します
|
21
|
+
なお、.htaccessの最後はちゃんと改行しています
|
22
|
+
|
23
|
+
/etc/httpd/conf/httpd.conf
|
24
|
+
```
|
25
|
+
<VirtualHost *:80>
|
26
|
+
ServerName 192.168.1.1
|
27
|
+
DocumentRoot /var/www/html
|
28
|
+
<Directory /var/www/html>
|
29
|
+
Options ExecCGI Includes FollowSymLinks
|
30
|
+
AllowOverride Options AuthConfig Limit FileInfo
|
31
|
+
Order allow,deny
|
32
|
+
Allow from all
|
33
|
+
</Directory>
|
34
|
+
ErrorLog /var/www/logs/error_log
|
35
|
+
CustomLog /var/www/logs/access_log combined env=!nolog
|
36
|
+
ErrorDocument 404 /error/404.html
|
37
|
+
RewriteEngine on
|
38
|
+
RewriteOptions inherit
|
39
|
+
</VirtualHost>
|
40
|
+
```
|
41
|
+
|
42
|
+
/var/www/html/.htaccess
|
43
|
+
```
|
44
|
+
Options +Includes
|
45
|
+
|
46
|
+
AddHandler server-parsed html
|
47
|
+
|
48
|
+
AddType image/svg+xml .svg .svgz
|
49
|
+
AddEncoding gzip .svgz
|
50
|
+
|
51
|
+
ErrorDocument 404 error/404.html
|
52
|
+
```
|
1
修正
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|