我需要一些关于Linux Mint的Apache安全configuration的帮助,因为我要托pipe我的网页,所以我想确保它以正确的方式configuration的Apache不允许任何人下载页面或configuration文件(到MySQL)通过wget命令。
Apache版本是2.4.18
这是/etc/apache2/apache2.conf文件的configurationforms
<Directory /> Options None AllowOverride None Require all denied </Directory> <Directory /usr/share> AllowOverride None Require all granted </Directory> <Directory /var/www/> Options -Indexes AllowOverride None Require all granted </Directory> <Directory /var/www/html/config> Options -Indexes AllowOverride None Require all denied </Directory> <Directory /var/www/html/blog> Options -Indexes AllowOverride None Require all granted </Directory> AccessFileName .httpdoverride <Files ~ "^\.ht"> Order allow,deny Deny from all Satisfy All </Files> # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # <FilesMatch "^\.ht"> Require all denied </FilesMatch> ServerSignature Off ServerTokens Prod KeepAliveTimeout 5 MaxKeepAliveRequests 100 KeepAlive On Timeout 300
注意:我现在没有域名,但是我会在不久的将来买一个域名。 重要的是我想configuration和保护Apache服务器。
预先感谢您,我真的很感激您的帮助:)
要加载网站,必须下载。 你不能(几乎)做你所要求的。
你可以通过很多方式阻止诸如wget之类的useragents(比如使用Apache RewriteCondconfiguration),但是useragents是由客户端提供的; 任何人都可以改变wget上的useragent,彻底击败你的意图。