Ubuntu14.04
出自 新化國中wiki平台
apache2
httpd.conf 不直接include,或者不適用 ,可放在conf.d
- 整個架構已微調:
/etc/apache2/ |-- apache2.conf | `-- ports.conf |-- mods-enabled | |-- *.load | `-- *.conf |-- conf-enabled | `-- *.conf `-- sites-enabled `-- *.conf
- conf的設定改變
Require all denied Require all granted Require host xxx.com Require ip 192.168.1 192.168.2 Require local
- Deny All
2.2 configuration: Order deny,allow Deny from all 2.4 configuration: Require all denied
- Allow All
2.2 configuration: Order allow,deny Allow from all 2.4 configuration: Require all granted
- Allow Host
2.2 configuration: Order Deny,Allow Deny from all Allow from example.org 2.4 configuration: Require host example.org
- Directory 用 Require all granted
<Directory /var/> Options FollowSymLinks AllowOverride None Require all granted </Directory>
- FilesMatch 維持用 Order
<FilesMatch ".+\.phps$"> SetHandler application/x-httpd-php-source Order Deny,Allow Allow from all </FilesMatch>
資安設定
- apache2 可設在security
SetEnvIf Range (,.*?){5,} bad-range=1 RequestHeader unset Range env=bad-range FileETag None ServerTokens Prod
- php.ini cookie over ssl with security
session.cookie_secure = 1