Hi,
I hadn't thought of doing this so simply, thank you very much!
I added one more condition if vhost does'nt contain servername:
$1 == "ServerName"{
srv = $2
ProxyPass_found = 0
}
$1 == "ProxyPass"{
ProxyPass_found = 1
print "Vhost#"srv $2
}
$1 == "</VirtualHost>" {
if...
Yes, it's more simple :)
When vhost doesn't contain "ProxyPass" value, when I read those scripts, I think output is empty.
I must call print function after set variables no?
Hi mikrom,
Thank you very much for your help, that's perfect [thumbsup2]
I thought I would have to process the files by blocks, but that was not a good idea.
Hi all,
I'm a beginner's awk.
I have a file apache like this:
<VirtualHost *:443>
ServerName site1.compagny.org
DocumentRoot /var/www/html/
SSLEngine on
SSLProxyEngine on
SSLCertificateFile /etc/httpd/ssl/company.crt
SSLCertificateKeyFile...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.