Hi all.
I have a virtual server setup and trying to add a second web site
(virtual). I created a file with the following:
<VirtualHost www.mobilecomputerschools.ca:80>
ServerAdmin alan@ashfieldsoftware.com
ServerName www.mobilecomputerschools.ca
DocumentRoot /var/www/mobilecomputerschools/
ErrorLog /var/log/apache2/mcs-error.log
CustomLog /var/log/apache2/mcs-custom.log combined
HostnameLookups Off
UseCanonicalName Off
ServerSignature On
On Thu, 2006-03-30 at 06:19 -0600, Alan Dowley wrote:
Hi all.
I have a virtual server setup and trying to add a second web site (virtual). I created a file with the following:
<VirtualHost www.mobilecomputerschools.ca:80>
ServerAdmin alan@ashfieldsoftware.com ServerName www.mobilecomputerschools.ca
DocumentRoot /var/www/mobilecomputerschools/ ErrorLog /var/log/apache2/mcs-error.log CustomLog /var/log/apache2/mcs-custom.log combined
HostnameLookups Off UseCanonicalName Off ServerSignature On
Options None AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost>
I have created the symlink and directory 'mcs' but when I restart the apache2 server I get the following error message:
Forcing reload of web server: Apache2Warning: DocumentRoot [/var/www/mobilecomputerschools/] does not exist Warning: DocumentRoot [/var/www/mobilecomputerschools/] does not exist
Can anyone tell me what is causing this error.
This is my first attempt at setting up a virtual web site.
Have you actually created the directory before restarting Apache? -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998
Ken Yes I created the directory before restarting the server. The following are the commands I used after creating the file. ln -s /etc/apache2/sites-available/mcs /etc/apache2/sites-enabled/msc mkdir /var/www/mcs then restarted the server. running cd /var/www/mcs showed there was a directory created. Alan Ken Schneider wrote:
On Thu, 2006-03-30 at 06:19 -0600, Alan Dowley wrote:
Hi all.
I have a virtual server setup and trying to add a second web site (virtual). I created a file with the following:
<VirtualHost www.mobilecomputerschools.ca:80>
ServerAdmin alan@ashfieldsoftware.com ServerName www.mobilecomputerschools.ca
DocumentRoot /var/www/mobilecomputerschools/ ErrorLog /var/log/apache2/mcs-error.log CustomLog /var/log/apache2/mcs-custom.log combined
HostnameLookups Off UseCanonicalName Off ServerSignature On
Options None AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost>
I have created the symlink and directory 'mcs' but when I restart the apache2 server I get the following error message:
Forcing reload of web server: Apache2Warning: DocumentRoot [/var/www/mobilecomputerschools/] does not exist Warning: DocumentRoot [/var/www/mobilecomputerschools/] does not exist
Can anyone tell me what is causing this error.
This is my first attempt at setting up a virtual web site.
Have you actually created the directory before restarting Apache?
On Thursday March 30 2006 08:59, Alan Dowley wrote:
Yes I created the directory before restarting the server. The following are the commands I used after creating the file.
ln -s /etc/apache2/sites-available/mcs /etc/apache2/sites-enabled/msc
I assume the "msc" in the above line is just a type in the message.
mkdir /var/www/mcs
then restarted the server.
running cd /var/www/mcs showed there was a directory created.
Okay, that looks like your problem. The actual directory you created
is /var/www/mcs, but the directory you've got in the Apache configuration
is /var/www/mobilecomputingschools. Try changing the lines in the Apache
configuration file to:
DocumentRoot /var/www/mcs/
and
Okay, that looks like your problem. The actual directory you created is /var/www/mcs, but the directory you've got in the Apache configuration is /var/www/mobilecomputingschools. Try changing the lines in the Apache configuration file to:
DocumentRoot /var/www/mcs/
and
and see if that does the trick for you.
Bob
I had spotted that and it has ben changed and now the web page shows up. Thanks to all for your help. Now I've got a lot more work to do getting the site finished. Thanks again to Dave Bottrill for his great support. Alan
On Thu, 2006-03-30 at 09:59 -0600, Alan Dowley wrote:
Ken Yes I created the directory before restarting the server. The following are the commands I used after creating the file.
ln -s /etc/apache2/sites-available/mcs /etc/apache2/sites-enabled/msc
mkdir /var/www/mcs
Are you using mcs or mobilecomputerschools ? You need to be consistant. And I don't think you can use symlinks here.
Options None AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost>
Please DO NOT top post. -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998
Ken Schneider wrote:
On Thu, 2006-03-30 at 09:59 -0600, Alan Dowley wrote:
Ken Yes I created the directory before restarting the server. The following are the commands I used after creating the file.
ln -s /etc/apache2/sites-available/mcs /etc/apache2/sites-enabled/msc
mkdir /var/www/mcs
Are you using mcs or mobilecomputerschools ? You need to be consistant. And I don't think you can use symlinks here.
Options None AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost>
Ken The info entered to create the file came from someone else who is much more experienced than I am in this matter. I noticed the difference and checked with my mate, Dave Bottrill and he agreed that it should be /mcs/ and not/mobilecomputerschools/ this was corrected and the site now comes up ok. I received the instructions to create the symlink from the same person and why it was used. Thanks or your help Alan
On Thursday March 30 2006 05:19, Alan Dowley wrote:
I have created the symlink and directory 'mcs' but when I restart the apache2 server I get the following error message:
Forcing reload of web server: Apache2Warning: DocumentRoot [/var/www/mobilecomputerschools/] does not exist Warning: DocumentRoot [/var/www/mobilecomputerschools/] does not exist
Can anyone tell me what is causing this error.
According to the error message, you don't have a
"/var/www/mobilecomputerschools/" directory. This is the "root" directory
for the files for the virtual web site. If the directory doesn't exist,
create it. If it does exist, check the permissions to make sure that Apache
can read it. There is a virtual hosts template file in /etc/apache2/vhosts.d
that you may want to look at. Also, I think you can do some of the setup
using YAST.
Here is an example of one that I have set up here for local web site
development work and testing.
---- snip ----
participants (3)
-
Alan Dowley
-
Bob Swift
-
Ken Schneider