Click to See Complete Forum and Search --> : Virtual hosts and document roots on 1.3
ginkoomo
02-06-2003, 09:50 PM
I'm trying to set up virtual hosts on my 1.3 server. I'm runing mandrake 9.0. My problem starts when I try to set up a document root as anything as the the default /var/www/html directory. This is even prior to setting up the virtual host directives. I'm a bit baffled. Just started messing with Linux 2 weeks ago so talk to me like a kid errrr maybe a real old guy lol.
Any help or just another trail to take would be apprecitated.
BTW when I do change the document root from the default and try to access the web site I get the FORBIDDEN you dont have permission to access / on this server.
Peace
Ginko
Gaston
02-07-2003, 12:22 PM
Can you post your errors on this thread? That would help
greatly and show the virtual directive you've set in your httpd.conf
so to see what could be wrong.
Also, have you already looked at your error.log file in logs dir, that
also will give some indications as what and where went wrong.
ginkoomo
02-07-2003, 01:54 PM
Will do.
After a bit more research today I think my problem might lie in the Directory command in httpdcommon.conf . I'll mess around with it and post my results here. If it is the Directory command there is no where in any "offical" documentation that tells you to change that or add it to the Virtual Host command.
Post in a bit.
Peace
Ginko
ginkoomo
02-07-2003, 03:49 PM
Ok here's what I found out. It is indeed the directory command that is the bugger in this. I didn't mess around with changing my document root for a single site but after reading the httpdcommon.conf file it has a wildcard for /home/*/public_html.
I set up my Virtual hosts to look for my document root in /home/www.domain1.com/public_html and it worked. Now it looks like if you want to change your document root into a totaly different directory other than the /var/www/html or the /home/*/public_html you will have to go into the httpdcommon.conf and at the bottom of the file is a directory command that prohibits accesing any other folders other than those that I listed. Change that command and it should work(didnt try this because having the websites in the /home/www.domain1.com/ made sense to me)
This all started because I wanted to put my web sites in /var/www directory i.e. /var/www/domain1 ect..... and I couldn't do it. Now maybe this is a problem with this version of Apache but that should be documented a bit better so that the avg Newux could understand it easier. There was not a hint in any "official" documentation to look for the problem in the httpdcommon.conf. Oh well I hope 3 days of trying to figure this out helps some other lost soul :)
Peace
Ginko