[admin@localhost extra]$ grep -v ^# httpd-info.conf

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from .example.com
</Location>

<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from .example.com
</Location>
[admin@localhost extra]$ egrep -v -e “#” httpd-info.conf

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from .example.com
</Location>

<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from .example.com
</Location>
[admin@localhost extra]$

 

[admin@localhost extra]$ egrep -e “SetHandler” httpd-info.conf
    SetHandler server-status
    SetHandler server-info
[admin@localhost extra]$

 

正規表現利用.jpg

Comments are closed.

Post Navigation