Config newbie-problems changing from old apache 1.3 to apache2 server

Hi Guys,

I’ve had an age-old apache 1.3 local development environment that I’ve decided to replace with a local apache2 environment with virtual sites instead, but I’m running into trouble and numerous online howto’s have gotten me nowhere. When restarting Apache, I get:

Reloading web server config: apache2apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
[Sat Jun 02 19:15:41 2012] [warn] NameVirtualHost *:80 has no VirtualHosts

I have:

created a virtual.conf file in etc/apache2/conf.d with content:

We’re running multiple virtual hosts.

NameVirtualHost *:80

I have added 127.0.0.1 localhost www.test1.com to etc/hosts

I have copied the content of the 00-default site-file into a new site-file called www.test1.com in sites-available and also sym-linked it into sites-enabled.
I have created another folder inside my existing home/jacques/websites/ folder called www.test1.com with a public_html folder where all the relavant site-files are now stashed.

this is my www.test1.com virtual host file:

<VirtualHost *:80>
	ServerAdmin webmaster@localhost
        ServerName www.test1.com
	DocumentRoot /home/jacques/websites/www.test1.com/public_html
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

I’m a complete newbie with Apache2, so there might be a few blunders here. I just don’t see 'em right now.

Hope you can point me in the right direction with Apache2 as I’d really like to “get it”.

Thx for reading - and a great online resource.

Bye.

  • in extension: When I enter just “localhost” in the browser-line, I get “It works!”, so somehow, something still points to var/www even though I changed the document root path.

Replacing the content of the “default” site-file with the content of my own www.test1.com site-file get’s everything working, but separate files for each site and not several “site-sections” configured inside the “default” site-file is supposed to be the way, correct?