l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2010 Aug 10 13:49

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Apache2 problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Apache2 problems

On Tue, Aug 10, 2010 at 03:50:00PM -0400, Peter Salzman wrote:
> I set up Apache2 on home Kubuntu box.   I defined one named virtual host in
> addition to "default" that came with the installation.  When I try to access
> the server from work, Firefox responds with "The connection timed out".
> When I run tcpdump -i eth0 tcp port 80, I see the incoming request from work
> to http://www.dirac.org:
> 14:30:42.219003 IP ny-131.foo.com.33188 > satan.www: Flags [S], seq
> 3646786876, win 64512, options [mss 1460,nop,nop,sackOK], length 0
> I also see (what looks to be) the outgoing packets from satan to work:
> 14:30:42.219027 IP satan.www > ny-131.foo.com.33188: Flags [S.], seq
> 2741002130, ack 3646786877, win 5840, options [mss 1460,nop,nop,sackOK],
> length 0
> However, *nothing* is getting written to the logs:
> -rw-r----- 1 root root   0 2010-08-10 12:21 access.log
> -rw-r----- 1 root root   0 2010-08-10 12:21 dirac.org.access
> -rw-r----- 1 root root   0 2010-08-10 12:21 dirac.org.error
> -rw-r----- 1 root root 330 2010-08-10 12:21 error.log
> The file error.log doesn't have anything interesting in it:
> [Tue Aug 10 12:21:00 2010] [notice] Apache/2.2.12 (Ubuntu)
> PHP/5.2.10-2ubuntu6.4 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0
> configured -- resuming normal operations
> [Tue Aug 10 12:21:00 2010] [info] Server built: Mar  9 2010 21:20:44
> [Tue Aug 10 12:21:00 2010] [debug] prefork.c(1013): AcceptMutex: sysvsem
> (default: sysvsem)
> From the lack of entries in the log file, it looks like Apache isn't seeing
> the incoming request.  However, tcpdump seems to be showing otherwise.  Port
> 80 is forwarded to the Linux box by the router.

First, we *need* to know the names of the files involved, since the
alphabetical order of the files determines which is the default host
(the first host is default, so you should have
sites-enabled/000-default and sites-enabled/001-dirac).

> In sites.enabled:

Did you verify that this is the correct IP address? (You probably want
to use "*:80" instead.)

> <VirtualHost>
>    ServerAdmin p@dirac.org
>    ServerName  www.dirac.org
>    ServerAlias dirac.org
>    # Indexes + Directory Root.
>    DirectoryIndex index.html
>    DocumentRoot /var/www/
>    # Logfiles
>    ErrorLog  /var/log/apache2/dirac.org.error
>    CustomLog //var/log/apache2/dirac.org.access combined
> </VirtualHost>
> The default enabled site starts off as:

You don't have a ServerName for the default site. Is it
possible that the default is catching all of the requests since it has
no name? Give it a name. Since it's the default (its configuration
file comes first alphabetically), it will still respond
to any unknown hostnames passed in the host header.

The link I quote below says:
"ServerName should always be set for each vhost. Otherwise A DNS lookup
is required for each vhost."

> <VirtualHost>
>    ServerAdmin p@dirac.org
>    DocumentRoot /var/www
>    . . .
> </VirtualHost>
> Any ideas what could be preventing this from working?

For more information about Apache virtual host ordering, see


Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.