conditional handling features:
A) make decisions based on current conditions:
1) modules available
2) remote HOST
3) browser type - useragent(http header request)
B) <IfDefine> parameter - directives to be processed at server startup
C) <IfModule> - directive to be processed based on module existence. Eg mod_ssl
D) <IfVersion> - directive processed based on version of apache
E) SetEnvIf[NoCase] -sets environmental VAR (variable) based on :
HTTP Request Header : i,e User-Agent, Referer , Accept-Language
Remote_(Addr|Host) server_addr, Request_(method|Protocol), Request_URI
Predefined Environmental VARs using : SetEnvIf[NoCase]
Task:
Explore <IfModule>
apachectl -D DUMP_MODULES
or
apache2ctl -M | grep -E "(static|shared)" | wc -l
cd /etc/apache2 && grep -R -i 'ifmodule' * --searches for ifmodule
inside the <VirutalHost>
<VirtualHost>
..
SetEnvIf Referer "site1.linuxcbt.internal" site1_referrer
CustomLog /var/log/apache2/site2.site1_referral.access.log combined env=site1_referrer
</VirtualHost>
A) make decisions based on current conditions:
1) modules available
2) remote HOST
3) browser type - useragent(http header request)
B) <IfDefine> parameter - directives to be processed at server startup
C) <IfModule> - directive to be processed based on module existence. Eg mod_ssl
D) <IfVersion> - directive processed based on version of apache
E) SetEnvIf[NoCase] -sets environmental VAR (variable) based on :
HTTP Request Header : i,e User-Agent, Referer , Accept-Language
Remote_(Addr|Host) server_addr, Request_(method|Protocol), Request_URI
Predefined Environmental VARs using : SetEnvIf[NoCase]
Task:
Explore <IfModule>
apachectl -D DUMP_MODULES
or
apache2ctl -M | grep -E "(static|shared)" | wc -l
cd /etc/apache2 && grep -R -i 'ifmodule' * --searches for ifmodule
inside the <VirutalHost>
<VirtualHost>
..
SetEnvIf Referer "site1.linuxcbt.internal" site1_referrer
CustomLog /var/log/apache2/site2.site1_referral.access.log combined env=site1_referrer
</VirtualHost>
No comments:
Post a Comment