Redirecting apache command line output on Windows
So, you want to run
httpd.exe -tS
to syntax check your conf file and view all virtual hosts. You need the virtual hosts info in a file but
httpd.exe -tS >file.txt
doesn’t work.
That’s because apache output goes to STDERR not STDOUT. I have used dos/windows for years and never had cause to know or use this but simply doing.
httpd.exe -tS 2>file.txt
Will work as it sends the STDERR output to the file you specify.