Re: [Hampshire] apache2 CGI script problem

Top Page

Reply to this message
Author: Alex
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] apache2 CGI script problem
On 11/6/07, Peter Alefounder <p_alefounder@???> wrote:
>
> My reason for using apache and not apache2 is that I have some
> documentation
> for the former. I'm not sure what differences there might be for apache2,
> and just wanted something that would work. Various bits of information
> about
> apache2 that I got from web sites are not terribly clear.



Apache configuration can be confusing. It's a bit of a dark art really.
http://httpd.apache.org/docs/2.2/ is a great place to start. I'm using
Apache 2.2.3 straight from apt.

>                      If you like I can share my relevant Virtual Host
> > declaration to see what's different.



Here's the default (i.e. www) virtual host for my site:

NameVirtualHost *:80
<VirtualHost *:80>
  ServerAdmin placid@???
  ServerName beplacid.net
  ServerAlias www.beplacid.net
  DocumentRoot /var/www/bp/www
  <Directory /var/www/bp/www/cgi-bin/>
    Options +ExecCGI
    AddHandler cgi-script .cgi
  </Directory>
 <Directory /var/www/bp/www/py-bin/>
   Options +ExecCGI
   AddHandler cgi-script .py
 </Directory>
 # snip Django and gzip compression configuration, just for readability
</VirtualHost>



Make sure you've got mod_cgi installed and enabled via `a2enmod cgi`. Remove
the py-bin stuff above if you don't need it.


> I certainly agree with that. Something that unexpectedly grabs all the
> memory has no place on my computer. I might put apache2 back: webmin is
> gone for good.
>


I run webmin at home where the box isn't hosting numerous sites and
databases. I seriously do not recommend using it for a production system
that's public-facing.

Hope that helps!

--
Alex Collins