[Techtalk] apache question

TraceyC grrliegeek at elenari.net
Fri Dec 4 19:39:40 UTC 2009


Hey Maria,

I administer a virtual apache web server and came across the same
frustration you did with those instructions. We have name based
virtualizatioq
n set up.

On Thu, 2009-12-03 at 23:42 -0800, Maria McKinley wrote:

> http://httpd.apache.org/docs/2.0/vhosts/examples.html 
(snip)
> 
> For example, am I correct in assuming that for the first example, the 
> first bit goes into ports.conf:
> 
> # Ensure that Apache listens on port 80
> Listen 80
> 
> this goes into apache2.conf:
> # Listen for virtual host requests on all IP addresses
> NameVirtualHost *:80
> 
> and each of these VirtualHost directives go into their own file in 
> sites-available?

Some of that I think depends on which distro you're running. On my
Fedora 8 server, the "Listen 80" and the "NameVirtualHost" are both in
httpd.conf. My VirtualHost directives are in their own files in
sites-available. I have one file per virtual site.


If you want to double check to see which files these lines are in for 
your distribution, I've found this command handy. 
It will "Search all regular files for 'example' in this dir and below"

   $ find -type f -print0 | xargs -r0 grep -F 'example'

So to find "Listen 80" the command would be 

   $ find -type f -print0 | xargs -r0 grep -F 'Listen 80'

It comes from this site, which has a bunch of useful command line stuff.
http://www.pixelbeat.org/cmdline.html

Tracey C



More information about the Techtalk mailing list