I am trying to host multiple websites from my linux box. I have been from one end of google to the other and tried about every suggestion I could read. I have also tried setting up webmin and have edited and re-edited my httpd.conf to death. I have one web site running now in the /var/www/ directory. I would like to host a few more in other directory's either by /home/user/public or /var/www/user/ I dont care. I have been able to get it half way working however I cannot seem to get rid of the default redhat index page. And usually the default website in the var/www/ starts pointing at the default redhat index page instead of my /var/www/html/index.html page.

Any help would be great.

Can you show us your httpd.conf file?

Thank you for responding. I wasnt sure if I should put the whole thing as a message so I am attaching txt file..

I'll take a look at it and get back to you later tonight. I already know the answer to one problem, but I want to verify this by checking your .conf file. As far as hosting multiple domains, again, I'll look at your current config and let you know what was wrong. If I'm in a good mood, I'll even edit for you and repost it to save you some trouble :)

Thanks for your help again..

Sorry I haven't replied yet, but I did take a look through your conf file, and it appears there's a number of things that are misconfigured, which would explain why you're having trouble with vhosts (multiple domains), among other things...

I would suggest taking a look at the online Apache documentation to get a better understanding on how virtual domain hosting works, which will help you understand how Apache handles it. Rather than just fixing your .conf file to make it "work" like you want, if you don't understand what you're doing, you won't know how to fix/make changes to it when you need to.

Here's the URLs for the docs you need, which should already be included in the "Manual" section included with Apache:

Configuration Sections:
http://httpd.apache.org/docs-2.0/sections.html

Virtual Host Documentation:
http://httpd.apache.org/docs-2.0/vhosts/

Apache 2.0 Root Documentation:
http://httpd.apache.org/docs-2.0/


In order to get rid of the default RedHat page like you want, you have to reconfigure your httpd.conf without any extras FIRST to make sure the basics work, then move on one step at a time and add features. I highly recommend trashing your existing config file and starting with a fresh copy (# cp httpd.conf.sample httpd.conf) which will contain an alias to the /docs ("Manual") directory.

Also, an error I see a lot is the ServerName variable entry. If you set that as "localhost", you'll have to access it by entering http://localhost as the URL. If you want outside access to your server, use www.mydomain.com as the ServerName:

ServerName www.mydomain.com

Another variable is the Listen variable. If you want Apache to listen for requests on port 80, then just enter 80 for the variable:

Listen 80

I'm not trying to shrug off your request for help, but it's important that you understand what you're doing when configuring any type of server. A misconfigured web server can lead to a compromised system, and create a ton of other problems from there (using your box as a platform to launch DDoS attacks, etc.)

Read the docs, and test it out. You should have it up and running in no time at all - certainly within 15 to 30 minutes or so. It's not very difficult, but if you still have problems, let me know.

Thank you for your help. I have taken a look at the apache links. I will scrap the old conf file and build using the information contained. I am sure I will be posting for more help. I really appreciate the assistance.

thanks TheOgre, those links seem good. They will come in handy for me aswell.