IPアドレスでアクセスした時に表示されるものを白紙のページを置くことで悪意のあるアクセスからの防御をする。
VirtualHost設定
<VirtualHost *:80>
ServerName dummy
DocumentRoot "/var/www/html"
...
</VirtualHost>
<Directory "/srv/httpd">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
<VirtualHost *:80>
ServerName official-hp.com
DocumentRoot "/srv/httpd/official-hp.com/"
...
</VirtualHost>
<VirtualHost *:80>
ServerName dev.official-hp.com
DocumentRoot "/srv/httpd/dev.official-hp.com/"
...
</VirtualHost>
<VirtualHost *:80>
ServerName staging.official-hp.com
DocumentRoot "/srv/httpd/staging.official-hp.com/"
...
</VirtualHost>
設定確認
defaultがdummyになっていることを確認。
$ sudo httpd -S
VirtualHost configuration:
*:80 is a NameVirtualHost
default server dummy (/etc/httpd/conf.d/officialhp.conf:1)
port 80 namevhost dummy (/etc/httpd/conf.d/officialhp.conf:1)
port 80 namevhost official-hp.com (/etc/httpd/conf.d/officialhp.conf:13)
port 80 namevhost dev.official-hp.com (/etc/httpd/conf.d/officialhp.conf:25)
port 80 namevhost staging.official-hp.com (/etc/httpd/conf.d/officialhp.conf:32)
...
以下の様なアクセスが毎日来ていたので。
Requests with error response codes
404 Not Found
//_phpmyadmin/scripts/setup.php: 1 Time(s)
//admin/phpmyadmin/scripts/setup.php: 1 Time(s)
//admin/pma/scripts/setup.php: 1 Time(s)
//admin/scripts/setup.php: 1 Time(s)
//administrator/components/com_joommyadmin ... ripts/setup.php: 1 Time(s)
//apache-default/phpmyadmin/scripts/setup.php: 1 Time(s)
//blog/phpmyadmin/scripts/setup.php: 1 Time(s)
//cpanelphpmyadmin/scripts/setup.php: 1 Time(s)
//cpphpmyadmin/scripts/setup.php: 1 Time(s)
//db/scripts/setup.php: 1 Time(s)
//dbadmin/scripts/setup.php: 1 Time(s)
//forum/phpmyadmin/scripts/setup.php: 1 Time(s)
//myadmin/scripts/setup.php: 1 Time(s)
//mysql/scripts/setup.php: 1 Time(s)
//mysqladmin/scripts/setup.php: 1 Time(s)
//php-my-admin/scripts/setup.php: 1 Time(s)
//php/phpmyadmin/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.10.0.0/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.10.0.1/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.10.0.2/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.10.0/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.10.1.0/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.10.2.0/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.11.0.0/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.11.1-all-languages/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.11.1.0/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.11.1.1/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.11.1.2/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.6.1-pl2/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.6.1-pl3/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.6.4-pl3/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.6.4-pl4/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.6.4-rc1/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.6.5/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.6.6/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.6.9/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.7.0-beta1/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.7.0-pl1/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.7.0-pl2/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.7.0-rc1/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.7.5/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.7.6/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.7.7/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.8.2.3/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.8.2/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.8.3/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.8.4/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.8.5/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.8.6/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.8.7/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.8.8/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.8.9/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.9.0-rc1/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.9.0.1/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.9.0.2/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.9.0/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.9.1/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2.9.2/scripts/setup.php: 1 Time(s)
//phpMyAdmin-2/scripts/setup.php: 2 Time(s)
//phpMyAdmin-3.0.0-rc1-english/scripts/setup.php: 1 Time(s)
//phpMyAdmin-3.0.0.0-all-languages/scripts/setup.php: 1 Time(s)
//phpMyAdmin-3.0.1.0-english/scripts/setup.php: 1 Time(s)
//phpMyAdmin-3.0.1.0/scripts/setup.php: 1 Time(s)
//phpMyAdmin-3.0.1.1/scripts/setup.php: 1 Time(s)
//phpMyAdmin-3.1.0.0-english/scripts/setup.php: 1 Time(s)
//phpMyAdmin-3.1.0.0/scripts/setup.php: 1 Time(s)
//phpMyAdmin-3.1.1.0-all-languages/scripts/setup.php: 1 Time(s)
//phpMyAdmin-3.1.2.0-all-languages/scripts/setup.php: 1 Time(s)
//phpMyAdmin-3.1.2.0-english/scripts/setup.php: 1 Time(s)
//phpMyAdmin-3.1.2.0/scripts/setup.php: 1 Time(s)
//phpMyAdmin-3.4.3.1/scripts/setup.php: 1 Time(s)
//phpMyAdmin2/scripts/setup.php: 1 Time(s)
//phpMyAdmin3/scripts/setup.php: 1 Time(s)
//phpadmin/scripts/setup.php: 1 Time(s)
//phpmyadmin/scripts/setup.php: 1 Time(s)
//pma/scripts/setup.php: 1 Time(s)
//scripts/setup.php: 1 Time(s)
//typo3/phpmyadmin/scripts/setup.php: 1 Time(s)
//web/phpMyAdmin/scripts/setup.php: 1 Time(s)
//web/scripts/setup.php: 1 Time(s)
//websql/scripts/setup.php: 1 Time(s)
//xampp/phpmyadmin/scripts/setup.php: 1 Time(s)
/cgi-sys/FormMail-clone.cgi: 2 Time(s)
/cgi-sys/defaultwebpage.cgi: 2 Time(s)
/cgi-sys/entropysearch.cgi: 2 Time(s)
/index.php: 2 Time(s)
/muieblackcat: 1 Time(s)
/myadmin/scripts/setup.php: 1 Time(s)
/phpMyAdmin/scripts/setup.php: 1 Time(s)
/pma/scripts/setup.php: 1 Time(s)
/rnrn/rnr/rn.php: 1 Time(s)
/robots.txt: 1 Time(s)