DevHeads.net

"apachectl -S" and DocumentRoot

Hello

apachectl -S

is a nice command. We are looking for something that outputs the "DocumentRoot" for all virtual hosts

Is there some way to do that with a single command?

Thanks

Comments

Re: "apachectl -S" and DocumentRoot

By LuKreme at 02/13/2018 - 21:46

On 13 Feb 2018, at 10:24, Rose, John B < ... at utk dot edu> wrote:
grep -ir documentroot /usr/local/etc/httpd/

(Or wherever your https.conf lives)

DocumentRoot "/usr/local/www/apache24/data"
DocumentRoot /usr/local/www/roundcube/
DocumentRoot /usr/local/www/postfixadmin
DocumentRoot /usr/local/www/phpMyAdmin
DocumentRoot "/usr/local/www/examle.com"
DocumentRoot "/usr/local/www/apache24/data"
DocumentRoot /usr/local/www/www.example.net/wordpress/
DocumentRoot /usr/local/www/anotherexample.tld/
DocumentRoot /usr/local/www/someone’s gallery.tld/html/
DocumentRoot /usr/home/msmith/Sites/
… etc etc