Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How would I get list of all hosted domains on centos server using bash command. I am runing centos server. I need to fetch the list of hosted domains on that server. I can get it using plesk. but It would be handy to know the way to do this using bash

share|improve this question
    
Which web server are you running? –  quanta Jun 8 '12 at 16:01
    
what does it mean for a domain to be "hosted" in this context? Web servers? Mail? Anything else? –  mattdm Jun 8 '12 at 16:17

1 Answer 1

up vote 3 down vote accepted

If you're using apache then

/usr/sbin/httpd -S 

Will will dump out a description of how Apache parsed the configuration file, which should be the configured hosts.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.