apache2 web server

Ian A Taylor iat at st-andrews.ac.uk
Wed Apr 23 15:04:00 UTC 2014


Marius

Thanks for reply

To answer your questions

/etc/apache2/sites-available/qwert

==================================================================
<VirtualHost *:80>
	ServerName fffff.st-and.ac.uk/qwert
	ServerAdmin A MAIL ADDRESS

	DocumentRoot /var/www/qwert

	<Directory /var/www/qwert>
		Options Indexes FollowSymLinks MultiViews +ExecCGI
		AllowOverride None
		Order deny,allow
		allow from all
	</Directory>

         ErrorLog ${APACHE_LOG_DIR}/error.log
         LogLevel warn
         CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
====================================================================

2. Do you have anything else in /etc/apache2/sites-enabled?

Yes

  000-default -> ../sites-available/default
  qwert -> ../sites-available/qwert


3. Is there a 'NameVirtualHost *:80' directive (in
      /etc/apache2/ports.conf, IIRC)?

Yes there is

Regards

Ian Taylor

On 23/04/14 13:50, Marius Gedminas wrote:
> On Wed, Apr 23, 2014 at 12:38:23PM +0100, Ian A Taylor wrote:
>> I am trying to setup an Apache2 web server on Ubuntu 12.04
>>
>> I can get a default web page to work ok
>>
>> But I cannot get  VirtualHosts to work
>> Well at least that is what I believe to be the case.
>>
>> When I define my virtual hosts in
>> /etc/apache2/sites-available
>>
>> I then run   a2ensite on that site-name
>>
>> In /etc/apache2/sites-enabled it creates the correct link
>>
>> However when I then try to visit the site I see error messages
>>
>> File does not exist: /var/www/qwert
>>
>> But in /etc/apache2/sites-available/qwert  there is a line
>>
>> DocumentRoot /home/qwert
>>
>> So why does it look in /var/www/qwert
>
>> The  Default DocumentRoot is /var/www
>>

>> But I simply do not understand why it wants to look in
>> /var/www/qwert and not /home/qwert
>>
>> Any help whould be sincerely appreciated
>
> We need some more information to answer that question:
>
> 1. What are the contents of /etc/apache2/sites-available/qwert?
>
> 2. Do you have anything else in /etc/apache2/sites-enabled?
>
> 3. Is there a 'NameVirtualHost *:80' directive (in
>     /etc/apache2/ports.conf, IIRC)?
>
> Marius Gedminas
>
>
>


-- 

Thanking you.

Yours sincerely



Ian Taylor
University of St.Andrews,
School of Physics & Astronomy,
North Haugh,
St.Andrews,
Fife  KY16 9SS,
Scotland.

e-Mail :- iat at st-and.ac.uk
Tel    :- (0)1334-463141
Fax    :- (0)1334-463104

The University of St Andrews
is a charity registered in
Scotland : No SC013532.




More information about the ubuntu-users mailing list