Re: Debian Etch apache2 virtual host problem



On Tue, Jul 31, 2007 at 09:30:38AM -0000, rocky wrote:
Hey,

I'm runing Debian etch with apache2 on it. To make the server host
many website I added the following code to the end of /etc/apache2/
apache2.conf
----------------------Code
begin--------------------------------------------------------------
NameVirtualHost *
<VirtualHost *>
# Basic setup
ServerAdmin webmaster@xxxxxxxxxxxx
ServerName www.workzone.com
DocumentRoot /var/www/workzone/htdocs


# HTML documents, with indexing.
<Directory />
Options +Includes
</Directory>

# CGI Handling
ScriptAlias /cgi-bin/ /var/www/workzone/cgi-bin/
<Location /cgi-bin>
Options +ExecCGI
</Location>

# Logfiles
ErrorLog /var/www/workzone/logs/error.log
CustomLog /var/www/workzone/logs/access.log combined
</VirtualHost>
---------------------------------Code
End----------------------------------------
The command apache2ctl configtest tells me "[Fri Jan 01 11:55:20 1999]
[warn] NameVirtualHost *:0 has no VirtualHosts
Syntax OK"

you have not specified any virtual hosts. something like:


<VirtualHost 192.168.2.3:80>
ServerName blah.foo.com
DocumentRoot /var/www/root/of/blah
CustomLog /var/log/apache2/access.log combined
</VirtualHost>

would be in order with a different block with unique ServerName for
each virtual host you want.

see http://httpd.apache.org/docs/1.3/vhosts/name-based.html

might be helpful

A

Attachment: signature.asc
Description: Digital signature



Relevant Pages

  • Re: Apache2 & mod_rewrite
    ... > Simo Kauppi ha scritto: ... >>It seems to me that the conditions for the first domain say that ... If the requested domain does not match any ServerName, ... And for the second host ServerAlias domain2.com *.domain2.com ...
    (Debian-User)
  • [SLE] DNS Problem
    ... I'm having a problem with DNS name resolution, and I need help resolving it. ... I'm running a 2-subnet LAN with a 3d NIC facing the Internet; the 2 subnets must go through the 3d NIC to get access to the Net. ... When I run host <FQDN ServerName> I get back "host ServerName not found: ...
    (SuSE)
  • RE: troubleshooting network settings
    ... Take a look at the 'ServerName' directive in your httpd.conf file. ... # If this is not set to valid DNS name for your host, ... # If your host doesn't have a registered DNS name, ... # redirections work in a sensible way. ...
    (freebsd-questions)
  • apache virtual host problem
    ... I am trying to set up apache2 to see more than one virtual host but don't ... This is the base configuration of my files, every different host will have ... ServerName Example.org ... publicIP(I wrote the number, not publicIP) example1.com *.example1.com ...
    (Ubuntu)
  • Re: Apache wont start
    ... # ServerName: allows you to set a host name which is sent back to ... You cannot just invent host names and hope they work. ... # define here must be a valid DNS name for your host. ... and this will make redirections work in a sensible way. ...
    (Debian-User)