Re: CGI Scripts, Apache 2.2.3, and Debian 4.0 R1

2007-12-17 Thread Bogart Salzberg


On Dec 16, 2007, at 2:29 PM, Jon D. Irish wrote:


Hi Mark,
Still no luck. I keep getting The webpage cannot be found errors.  
Is it possible that I am missing an Apache package? Here are my  
index,html and config files (if it would help).


Thanks,
Jon


Jon,

By the webpage cannot be found, do you mean a 404 Not Found  
response? What URL are you using to make the request? I ask this  
because it is important to ensure, first of all, that your request is  
actually being received by Apache. If it is, there should be an entry  
in both the access and error logs with information about the request,  
such as the path of the file that Apache believes you are requesting.  
Unless you have specified an alternate location, such as with the  
ErrorLog directive, then I think you will find the error log in / 
var/log/apache2.


HTH

Bogart



- Original Message 
From: Mark Grieveson [EMAIL PROTECTED]
To: debian-user@lists.debian.org
Sent: Sunday, December 16, 2007 9:37:41 AM
Subject: Re: CGI Scripts, Apache 2.2.3, and Debian 4.0 R1

On Sun, 16 Dec 2007 08:05:04 + (UTC)
[EMAIL PROTECTED] wrote:


Directory /var/www/cgi-bin
   AllowOverride None
   Options Indexes Includes FollowSymLinks
   Order deny,allow
   Deny from all
   Allow from 192.168.1
/Directory

Neither of these has allowed my cgi scripts to run. Can someone
please tell me what I am doing wrong?
Sincerely,
Jon



Red Hat, and others, use /var/www/cgi-bin, as the directory.  I've
found, for Debian, that the correct directory is /usr/lib/cgi-bin/;  
so,

change Directory /var/www/cgi-bin to:
Directory /usr/lib/cgi-bin.

When I ran a webserver, I also had the scriptalias stuff in the
file /etc/apache2/sites-available/default file.  I was running a
virtual host though; so, for yourself, the sites-available file may  
not

be important.

Mark


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact  
[EMAIL PROTECTED]



   
__ 
__

Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http:// 
mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ Apache2.tar



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: CGI Scripts, Apache 2.2.3, and Debian 4.0 R1

2007-12-17 Thread Jon D. Irish
Hi Freddy,
I was finally able to get it working, but I'm not exactly sure what I did to 
fix it. I think that it might have been enabling the cgid module. Does this 
make sense. Otherwise, I set most of the setting back to default, restarted 
Apache, and the scripts starting working.

Jon

- Original Message 
From: Freddy Freeloader [EMAIL PROTECTED]
To: Debian User debian-user@lists.debian.org
Sent: Sunday, December 16, 2007 10:22:09 PM
Subject: Re: CGI Scripts, Apache 2.2.3, and Debian 4.0 R1

Jon D. Irish wrote:
 I have a clean install of Debian 4.0 R1 with Apache 2.2.3-4 installed. I can 
 not get cgi scripts to execute from the website. I have researched the Apache 
 site and tried both of the following:
  
 1) Under apache2.conf, I added
Directory /var/www/cgi-bin 
  Options +ExecCGI
  AddHandler cgi-script .cgi .pl
/Directory 
  
 2) Under httpd.conf, I added
 #
 # ScriptAlias: This controls which directories contain server scripts.
 # ScriptAliases are essentially the same as Aliases, except that
 # documents in the realname directory are treated as applications and
 # run by the server when requested rather than as documents sent to the 
 client.
 # The same rules about trailing / apply to ScriptAlias directives as to
 # Alias.
 #
 ScriptAlias /cgi-bin/ /var/www/cgi-bin/
 #
 # /var/www/cgi-bin should be changed to whatever your ScriptAliased
 # CGI directory exists, if you have that configured.
 #
 Directory /var/www/cgi-bin
AllowOverride None
Options Indexes Includes FollowSymLinks
Order deny,allow
Deny from all
Allow from 192.168.1
 /Directory
  
 Neither of these has allowed my cgi scripts to run. Can someone please tell 
 me what I am doing wrong?
  
 Sincerely,
 Jon


  
 
 Looking for last minute shopping deals?  
 Find them fast with Yahoo! Search.   
 http://tools.search.yahoo.com/newsearch/category.php?category=shopping


  
This may be a stupid question, but did you enable the cgi module by 
creating a symbolic link from /etc/apache2/mods-enabled to 
/etc/apache2/mods-available and install the appropriate php4/php5-cgi 
package or the libapache-mod-fastcgi depending on your usage?  Without 
doing those two things pache won't/can't load the cgi module. 

There are also some libcgi packages for perl and a couple of other 
languages too, but I'm not familiar with them as I've never had occasion 
to use them. 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: CGI Scripts, Apache 2.2.3, and Debian 4.0 R1

2007-12-17 Thread Freddy Freeloader

Jon D. Irish wrote:

Hi Freddy,
I was finally able to get it working, but I'm not exactly sure what I did to 
fix it. I think that it might have been enabling the cgid module. Does this 
make sense. Otherwise, I set most of the setting back to default, restarted 
Apache, and the scripts starting working.

Jon

- Original Message 
From: Freddy Freeloader [EMAIL PROTECTED]
To: Debian User debian-user@lists.debian.org
Sent: Sunday, December 16, 2007 10:22:09 PM
Subject: Re: CGI Scripts, Apache 2.2.3, and Debian 4.0 R1

Jon D. Irish wrote:
  

I have a clean install of Debian 4.0 R1 with Apache 2.2.3-4 installed. I can 
not get cgi scripts to execute from the website. I have researched the Apache 
site and tried both of the following:
 
1) Under apache2.conf, I added

   Directory /var/www/cgi-bin 
 Options +ExecCGI
 AddHandler cgi-script .cgi .pl
   /Directory 
 
2) Under httpd.conf, I added

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing / apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
#
# /var/www/cgi-bin should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
Directory /var/www/cgi-bin
   AllowOverride None
   Options Indexes Includes FollowSymLinks
   Order deny,allow
   Deny from all
   Allow from 192.168.1
/Directory
 
Neither of these has allowed my cgi scripts to run. Can someone please tell me what I am doing wrong?
 
Sincerely,

Jon


 

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.   http://tools.search.yahoo.com/newsearch/category.php?category=shopping



 

This may be a stupid question, but did you enable the cgi module by 
creating a symbolic link from /etc/apache2/mods-enabled to 
/etc/apache2/mods-available and install the appropriate php4/php5-cgi 
package or the libapache-mod-fastcgi depending on your usage?  Without 
doing those two things pache won't/can't load the cgi module. 

There are also some libcgi packages for perl and a couple of other 
languages too, but I'm not familiar with them as I've never had occasion 
to use them. 



  
Not knowing what all you did, or exactly what type of scripts you're 
using, it's impossible to tell.  I just know if you don't enable the 
correct modules for what you're doing no matter what's in your 
httpd.conf or your virtual server settings it just won't work.  The 
correct combination of enabled modules and configuration settings is 
what works. 

You can tell which modules have been loaded, both dynamically and 
statically, by running, as root, apache2 -D DUMP_MODULES. 



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: CGI Scripts, Apache 2.2.3, and Debian 4.0 R1

2007-12-16 Thread Mark Grieveson
On Sun, 16 Dec 2007 08:05:04 + (UTC)
[EMAIL PROTECTED] wrote:

 Directory /var/www/cgi-bin
 AllowOverride None
 Options Indexes Includes FollowSymLinks
 Order deny,allow
 Deny from all
 Allow from 192.168.1
 /Directory
  
 Neither of these has allowed my cgi scripts to run. Can someone
 please tell me what I am doing wrong? 
 Sincerely,
 Jon


Red Hat, and others, use /var/www/cgi-bin, as the directory.  I've
found, for Debian, that the correct directory is /usr/lib/cgi-bin/; so,
change Directory /var/www/cgi-bin to: 
Directory /usr/lib/cgi-bin.

When I ran a webserver, I also had the scriptalias stuff in the
file /etc/apache2/sites-available/default file.  I was running a
virtual host though; so, for yourself, the sites-available file may not
be important.

Mark


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: CGI Scripts, Apache 2.2.3, and Debian 4.0 R1

2007-12-16 Thread Jon D. Irish
Hi Mark,
Still no luck. I keep getting The webpage cannot be found errors. Is it 
possible that I am missing an Apache package? Here are my index,html and config 
files (if it would help).

Thanks, 
Jon

- Original Message 
From: Mark Grieveson [EMAIL PROTECTED]
To: debian-user@lists.debian.org
Sent: Sunday, December 16, 2007 9:37:41 AM
Subject: Re: CGI Scripts, Apache 2.2.3, and Debian 4.0 R1

On Sun, 16 Dec 2007 08:05:04 + (UTC)
[EMAIL PROTECTED] wrote:

 Directory /var/www/cgi-bin
AllowOverride None
Options Indexes Includes FollowSymLinks
Order deny,allow
Deny from all
Allow from 192.168.1
 /Directory
  
 Neither of these has allowed my cgi scripts to run. Can someone
 please tell me what I am doing wrong? 
 Sincerely,
 Jon


Red Hat, and others, use /var/www/cgi-bin, as the directory.  I've
found, for Debian, that the correct directory is /usr/lib/cgi-bin/; so,
change Directory /var/www/cgi-bin to: 
Directory /usr/lib/cgi-bin.

When I ran a webserver, I also had the scriptalias stuff in the
file /etc/apache2/sites-available/default file.  I was running a
virtual host though; so, for yourself, the sites-available file may not
be important.

Mark


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


Apache2.tar
Description: Binary data


Re: CGI Scripts, Apache 2.2.3, and Debian 4.0 R1

2007-12-16 Thread Mark Grieveson
On Sun, 16 Dec 2007 11:29:26 -0800 (PST)
Jon D. Irish [EMAIL PROTECTED] wrote:

 Hi Mark,
 Still no luck. I keep getting The webpage cannot be found errors.
 Is it possible that I am missing an Apache package? Here are my
 index,html and config files (if it would help).
 
 Thanks, 
 Jon


I don't have a ready answer, but just a few thoughts.

What's your DocumentRoot set up as?  This would be
in /etc/apache2/sites-available2/default.  Make sure it points to your
index file (aka your homepage).

It's a good idea to restart apache2 after making any changes, with the
command:

/etc/init.d/apache2 restart

Might be an idea to install and read apache2-doc -- it comes with some
good examples.

There's a site I googled that has some basic instructions, at
http://www.free-bees.co.uk/articles/apachetest/print/

Good luck!

Mark

PS, if, even after tinkering, things still don't work, you could try
webmin, where the debian package can be obtained at
http://www.webmin.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: CGI Scripts, Apache 2.2.3, and Debian 4.0 R1

2007-12-16 Thread Freddy Freeloader

Jon D. Irish wrote:

I have a clean install of Debian 4.0 R1 with Apache 2.2.3-4 installed. I can 
not get cgi scripts to execute from the website. I have researched the Apache 
site and tried both of the following:
 
1) Under apache2.conf, I added

Directory /var/www/cgi-bin 
  Options +ExecCGI
  AddHandler cgi-script .cgi .pl
/Directory 
 
2) Under httpd.conf, I added

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing / apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
#
# /var/www/cgi-bin should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
Directory /var/www/cgi-bin
AllowOverride None
Options Indexes Includes FollowSymLinks
Order deny,allow
Deny from all
Allow from 192.168.1
/Directory
 
Neither of these has allowed my cgi scripts to run. Can someone please tell me what I am doing wrong?
 
Sincerely,

Jon


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping



  
This may be a stupid question, but did you enable the cgi module by 
creating a symbolic link from /etc/apache2/mods-enabled to 
/etc/apache2/mods-available and install the appropriate php4/php5-cgi 
package or the libapache-mod-fastcgi depending on your usage?  Without 
doing those two things pache won't/can't load the cgi module. 

There are also some libcgi packages for perl and a couple of other 
languages too, but I'm not familiar with them as I've never had occasion 
to use them. 



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




CGI Scripts, Apache 2.2.3, and Debian 4.0 R1

2007-12-15 Thread Jon D. Irish
I have a clean install of Debian 4.0 R1 with Apache 2.2.3-4 installed. I can 
not get cgi scripts to execute from the website. I have researched the Apache 
site and tried both of the following:
 
1) Under apache2.conf, I added
Directory /var/www/cgi-bin 
  Options +ExecCGI
  AddHandler cgi-script .cgi .pl
/Directory 
 
2) Under httpd.conf, I added
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing / apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
#
# /var/www/cgi-bin should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
Directory /var/www/cgi-bin
AllowOverride None
Options Indexes Includes FollowSymLinks
Order deny,allow
Deny from all
Allow from 192.168.1
/Directory
 
Neither of these has allowed my cgi scripts to run. Can someone please tell me 
what I am doing wrong?
 
Sincerely,
Jon


  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]