Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

2.4. 限​​​​​​​制​​​​​​​对​​​​​​​ Piranha Configuration Tool的​​​​​​​访​​​​​​​问​​​​​​​

Piranha Configuration Tool提​​​​​​​示​​​​​​​一​​​​​​​个​​​​​​​可​​​​​​​用​​​​​​​的​​​​​​​用​​​​​​​户​​​​​​​名​​​​​​​和​​​​​​​密​​​​​​​码​​​​​​​组​​​​​​​合​​​​​​​。​​​​​​​但​​​​​​​所​​​​​​​有​​​​​​​传​​​​​​​递​​​​​​​给​​​​​​​ Piranha Configuration Tool的​​​​​​​数​​​​​​​据​​​​​​​都​​​​​​​是​​​​​​​明​​​​​​​文​​​​​​​的​​​​​​​,因​​​​​​​此​​​​​​​建​​​​​​​议​​​​​​​您​​​​​​​将​​​​​​​对​​​​​​​它​​​​​​​的​​​​​​​访​​​​​​​问​​​​​​​限​​​​​​​制​​​​​​​在​​​​​​​可​​​​​​​信​​​​​​​的​​​​​​​网​​​​​​​络​​​​​​​或​​​​​​​者​​​​​​​本​​​​​​​地​​​​​​​机​​​​​​​器​​​​​​​。​​​​​​​
The easiest way to restrict access is to use the Apache HTTP Server's built in access control mechanisms by editing /etc/sysconfig/ha/web/secure/.htaccess. After altering the file you do not have to restart the piranha-gui service because the server checks the .htaccess file each time it accesses the directory.
默​​​​​​​认​​​​​​​情​​​​​​​况​​​​​​​下​​​​​​​,对​​​​​​​此​​​​​​​目​​​​​​​录​​​​​​​的​​​​​​​访​​​​​​​问​​​​​​​控​​​​​​​制​​​​​​​允​​​​​​​许​​​​​​​任​​​​​​​何​​​​​​​人​​​​​​​浏​​​​​​​览​​​​​​​目​​​​​​​录​​​​​​​内​​​​​​​容​​​​​​​。​​​​​​​以​​​​​​​下​​​​​​​就​​​​​​​是​​​​​​​默​​​​​​​认​​​​​​​访​​​​​​​文​​​​​​​件​​​​​​​的​​​​​​​形​​​​​​​式​​​​​​​:
Order deny,allow
Allow from all
要​​​​​​​将​​​​​​​对​​​​​​​ Piranha Configuration Tool的​​​​​​​访​​​​​​​问​​​​​​​限​​​​​​​制​​​​​​​在​​​​​​​只​​​​​​​允​​​​​​​许​​​​​​​本​​​​​​​地​​​​​​​主​​​​​​​机​​​​​​​访​​​​​​​问​​​​​​​,请​​​​​​​将​​​​​​​ .htaccess 文​​​​​​​件​​​​​​​修​​​​​​​改​​​​​​​为​​​​​​​只​​​​​​​允​​​​​​​许​​​​​​​来​​​​​​​自​​​​​​​回​​​​​​​送​​​​​​​设​​​​​​​备​​​​​​​(127.0.0.1)的​​​​​​​访​​​​​​​问​​​​​​​。​​​​​​​有​​​​​​​关​​​​​​​回​​​​​​​送​​​​​​​设​​​​​​​备​​​​​​​的​​​​​​​详​​​​​​​情​​​​​​​请​​​​​​​参​​​​​​​考​​​​​​​Red Hat Enterprise Linux Reference Guide的​​​​​​​网​​​​​​​络​​​​​​​脚​​​​​​​本​​​​​​​一​​​​​​​章​​​​​​​。​​​​​​​
Order deny,allow
Deny from all
Allow from 127.0.0.1
本​​​​​​​示​​​​​​​例​​​​​​​中​​​​​​​您​​​​​​​还​​​​​​​可​​​​​​​以​​​​​​​允​​​​​​​许​​​​​​​特​​​​​​​定​​​​​​​主​​​​​​​机​​​​​​​或​​​​​​​者​​​​​​​子​​​​​​​网​​​​​​​:
Order deny,allow
Deny from all
Allow from 192.168.1.100
Allow from 172.16.57
在​​​​​​​本​​​​​​​示​​​​​​​例​​​​​​​中​​​​​​​,只​​​​​​​有​​​​​​​来​​​​​​​自​​​​​​​ IP 地​​​​​​​址​​​​​​​为​​​​​​​ 192.168.1.100 和​​​​​​​ 172.16.57/24 网​​​​​​​络​​​​​​​中​​​​​​​的​​​​​​​机​​​​​​​器​​​​​​​使​​​​​​​用​​​​​​​的​​​​​​​网​​​​​​​页​​​​​​​浏​​​​​​​览​​​​​​​器​​​​​​​可​​​​​​​访​​​​​​​问​​​​​​​ Piranha Configuration Tool。​​​​​​​

警告

编​​​​​​​辑​​​​​​​ Piranha Configuration Tool .htaccess 文​​​​​​​件​​​​​​​可​​​​​​​限​​​​​​​制​​​​​​​对​​​​​​​位​​​​​​​于​​​​​​​ /etc/sysconfig/ha/web/secure/ 目​​​​​​​录​​​​​​​中​​​​​​​的​​​​​​​配​​​​​​​置​​​​​​​页​​​​​​​的​​​​​​​访​​​​​​​问​​​​​​​,但​​​​​​​不​​​​​​​会​​​​​​​限​​​​​​​制​​​​​​​登​​​​​​​录​​​​​​​和​​​​​​​对​​​​​​​位​​​​​​​于​​​​​​​ /etc/sysconfig/ha/web/ 目​​​​​​​录​​​​​​​的​​​​​​​帮​​​​​​​助​​​​​​​页​​​​​​​的​​​​​​​访​​​​​​​问​​​​​​​。​​​​​​​要​​​​​​​限​​​​​​​制​​​​​​​对​​​​​​​此​​​​​​​目​​​​​​​录​​​​​​​的​​​​​​​访​​​​​​​问​​​​​​​,请​​​​​​​在​​​​​​​ /etc/sysconfig/ha/web/ 目​​​​​​​录​​​​​​​中​​​​​​​创​​​​​​​建​​​​​​​ .htaccess 文​​​​​​​件​​​​​​​,并​​​​​​​使​​​​​​​用​​​​​​​和​​​​​​​ /etc/sysconfig/ha/web/secure/.htaccess 文​​​​​​​件​​​​​​​一​​​​​​​样​​​​​​​的​​​​​​​ order、​​​​​​​allow 和​​​​​​​ deny 行​​​​​​​。​​​​​​​