I tried to set up web server Apache on a Red Hat Linux Pro 9.0 with virtual hosts, using name-based virtual hosts.
If I removed all the virtual hosts directives, the web server works correctly as expected, i.e. no virtual hosts at all. The web server serves only 1 domain name and the index.html file is placed in the default DocumentRoot directory "/var/www/html"
If I added the virtual host directives into the httpd.conf, even only 1 virtual host (to test it), the web server starts with error and then it can only gets into the test page and couldn't get to the virtual host DocumentRoot directory.
I've tried to solve this problme for 2 weeks and I couldn't make it work correctly. I thought I would be very helpful for me if I can learn from a working httpd.conf file. If any of you have a httpd.conf file that contains virtual host directives, using name-based virtual hosts, and is currently working correctly, please give me a copy ot it. Of course, you need to replace all the specific details of your web site like IP address, etc. with the generic info. Any help would be appreciated
Thanks a lot for any help,