19. ドキュメントルートの変更
<Directory />
AllowOverride none
Require all denied
</Directory>
<Directory "/home/eamautic/public_html">
AllowOverride All
Require all denied
</Directory>
<Directory "/home/eamautic/public_html/easfma">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
/etc/httpd/conf/httpd.confの設定を行う
※CentOS 7なので本来は上記の設定だが、なぜかドキュメントルートが見えてしまった
のでファイルサイズがゼロのindex.htmlを入れておく
20. ドキュメントルートの変更
<Directory />
AllowOverride none
Deny from all
</Directory>
<Directory "/home/eamautic/public_html">
order deny,allow
Deny from all
AllowOverride None
</Directory>
<Directory "/home/eamautic/public_html/easfma">
order allow,deny
allow from all
Options FollowSymLinks
AllowOverride All
</Directory>
/etc/httpd/conf/httpd.confの設定を行う(mod_access_compat が使える場合)
26. Mauticを使っていることを隠匿
404.html.php
<?php
/**
* @copyright 2014 Mautic Contributors.
All rights reserved.
*/
$view['slots']->set('mautibot',
'openMouth');
$view['slots']->set('message',
'mautic.core.error.404');
$view-
>extend('MauticCoreBundle:Error:base.
html.php');
?>
変更前
<?php
/**
* @copyright 2014 Mautic Contributors.
All rights reserved.
*/
header('HTTP/1.1 404 Not Found');
?>
<!DOCTYPE HTML PUBLIC "-
//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found
on this server.</p>
</body></html>
変更後
28. Mauticを使っていることを隠匿
500.html.php
<?php
/**
* @copyright 2014 Mautic Contributors. All rights reserved.
*/
header('HTTP/1.1 500 Internal Server Error');
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or misconfiguration and was unable
to complete your request. Please contact the server administrator, and inform
them of the time the error occurred, and anything you might have done that may
have caused the error. More information about this error may be available in the
server error log.<br>
<br>
Additionally, a 500 Internal Server Error error was encountered while trying to use
an ErrorDocument to handle the request.</p></body></html>
変更後