You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Michael Olds <Mi...@themozone.net> on 2003/01/22 00:04:00 UTC

[users@httpd] Basic CGI setup help needed

Hello again,

I could really use some help on this. (Please don't send me to the docs. I
have read the docs over and over, I have also got two books on Apache server
administration which I have read and followed carefully...this is a basic
issue that has some kind of problem). At this time I have once more run out
of variables to test in my epic attempt to set up a simple working cgi-bin
on my Debian Woody. I have just completed what I think is a fresh install of
apache. I uninstalled apache and apache-common after renaming /etc/apache
and /usr/lib/apache. The reinstall (package, not source) seems to be ok (no
errors) and I am able to serve files from my two VirtualHosts, including a
complex php/mysql script. I cannot get a simple test.cgi:
############################################
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><head><title>Environment Variables</title></head><body>";
print "<h2>Environment Variables:</h2>";
print "<hr>\n";
foreach $evar( keys (%ENV)){
   print "<b>$evar:</b> $ENV{$evar}<br />";
}
print "</body></html>\n";
#############################################

to run -- I have tried others, and the path to Perl is correct (unless there
is something going on with versions of perl...I have three, two later than
"perl" "perl-5.6" and "perl5.6.1").

The default enabled LoadModule cgi_module...

Error message:
Internal Server Error, and the log file gives Premature End of Script
Headers

I have an almost default httpd.conf. I have changed the DocumentRoot to
/www/websites
and set the ScriptAlias to /cgi-bin/ /www/cgi-bin/
with
<Directory /www/cgi-bin/>
   AllowOverride none
   Options ExecCGI
   Order allow,deny
   Allow from all
</Directory>
(not copied and pasted, the only thing changed from the default was the
directory path)

I have user and group www-data (the Debian default)
Perms: user/group: root /cgi-bin/ rwx-rwx-rx
      user/group: me/www-data /sub-directory/ rwx-rwx-rx
      user/group: me/www-data /test.cgi rwx-rwx-r-x
(I have tried all kinds and varieties of perms/users/groups this is just the
latest)

This is a Debian setup so suEXEC is enabled by default. I have tried it
dis-abled by changing the name to suexec-not. (apache -l tells me it is
disabled) Enabled or disabled makes no difference. suEXEC is not generating
any log.

CGI was working on this server a while back, under the DocumentRoot of the
first VirtualHost, ScriptAliased from within the VirtualHost, but I cannot
even get it to work that way any longer.
The only thing I can think of at this point is that there is something else,
non-apache/non-cgi/non-permissions related, that is not working, but I have
no idea what that might be or of how to test for what it might be. I am new
enough to have missed something basic. A missing module? If this is related
to my setup a clue may be that one other thing that I absolutely cannot get
to work is a printer.


Best Wishes!
Mike Olds www.buddhadust.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Basic CGI setup help needed

Posted by Michael Olds <Mi...@themozone.net>.
On Tue, 21 Jan 2003, Michael Olds wrote:
> This is a Debian setup so suEXEC is enabled by default. I have tried it
> dis-abled by changing the name to suexec-not. (apache -l tells me it is
> disabled) Enabled or disabled makes no difference. suEXEC is not
generating
> any log.

You need to find and read the SuExec log to see exactly what test your are
failing.

If you really want to disable suexec, you should just be able to locate
the binary and "chmod -x" it, and then restart apache.

<------------->

Thank you

Joshua,

There are several methods of disabling suEXEC (rename it, change the user
and group, change the set user bit) and I have tried them all and all
together as well. In any case, in all cases, apache -l is giving me the
information that suEXEC is disabled. And that is how I want it. I know where
it should be writing a log and it isn't writing a log...but from what I
understand there is no reason to write a log when trying the setup I was
tring.

I do not want to use suEXEC. I want a simple one person manages the cgi-bin
setup such as I have described.

Robert:

>Hopefully I'm mis-reading your "snip" delimiter but ... you don't actually
>have all those pounds in the first line, do you?

haha...no, I added that to beautify the post only...

Best Wishes!
Mike Olds www.buddhadust.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Basic CGI setup help needed

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 21 Jan 2003, Michael Olds wrote:
> This is a Debian setup so suEXEC is enabled by default. I have tried it
> dis-abled by changing the name to suexec-not. (apache -l tells me it is
> disabled) Enabled or disabled makes no difference. suEXEC is not generating
> any log.

You need to find and read the SuExec log to see exactly what test your are
failing.

If you really want to disable suexec, you should just be able to locate
the binary and "chmod -x" it, and then restart apache.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Rewrite rules

Posted by James <ja...@hotmail.com>.
Hi Guys,
No, it is not our server. So I cannot get to that server. I just
received some links. OK, it is possible if apache reverse proxy first
gets page from another web server with original software and then change
all hyperlinks in that page to some other IP and serve those pages to
client?

James

-----Original Message-----
From: George Valpak [mailto:gvalpak@yahoo.com] 
Sent: 22 January 2003 03:15
To: users@httpd.apache.org
Subject: RE: [users@httpd] Rewrite rules


Is the other web server with the IP addresses one of your own servers?
Can you give us the URL? Why can't you or someone change it as part of
the project of putting the proxy in place? Didn't  it used to show the
IP address before you started proxying it if you didn't change the HTML
or templates or whatever? If the requirement to fix that has changed
along with the need to proxy, why not just fix the HTML? I can imagine
some good reasons why not if you have a complex set up, if so there are
a variety of ways to go here.

GV
At 02:20 AM 1/22/2003 +0000, James wrote:
>Well no that cannot be done. That's why I am asking for help.
>
>james
>
>-----Original Message-----
>From: George Valpak [mailto:gvalpak@yahoo.com]
>Sent: 22 January 2003 01:54
>To: users@httpd.apache.org; users@httpd.apache.org
>Subject: Re: [users@httpd] Rewrite rules
>
>
>
>At 01:41 AM 1/22/2003 +0000, James wrote:
>>Hi,
>>I want some help with rewrite rules.
>>
>>Following is what I want to achieve:
>>I have one server with apache+mod_rewrite acting as a reverse proxy.
>>This server gets all its data from another web server. Now everything 
>>works fine except one strange problem. In the software on web server 
>>there are few pages which are hard coded with ip address so when I 
>>click on that link it tries to change the URL and my browser gives me 
>>error as that url is not accessible from internet.
>
>Can you just fix the html to remove the harcoded IP addresses?
>
>GV
>
>
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server 
>Project. See <URL:http://httpd.apache.org/userslist.html> for more 
>info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server 
>Project. See <URL:http://httpd.apache.org/userslist.html> for more 
>info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Rewrite rules

Posted by George Valpak <gv...@yahoo.com>.
Is the other web server with the IP addresses one of your own servers? Can you give us the URL? Why can't you or someone change it as part of the project of putting the proxy in place? Didn't  it used to show the IP address before you started proxying it if you didn't change the HTML or templates or whatever? If the requirement to fix that has changed along with the need to proxy, why not just fix the HTML? I can imagine some good reasons why not if you have a complex set up, if so there are a variety of ways to go here.

GV
At 02:20 AM 1/22/2003 +0000, James wrote:
>Well no that cannot be done. That's why I am asking for help.
>
>james
>
>-----Original Message-----
>From: George Valpak [mailto:gvalpak@yahoo.com] 
>Sent: 22 January 2003 01:54
>To: users@httpd.apache.org; users@httpd.apache.org
>Subject: Re: [users@httpd] Rewrite rules
>
>
>
>At 01:41 AM 1/22/2003 +0000, James wrote:
>>Hi,
>>I want some help with rewrite rules.
>>
>>Following is what I want to achieve:
>>I have one server with apache+mod_rewrite acting as a reverse proxy. 
>>This server gets all its data from another web server. Now everything 
>>works fine except one strange problem. In the software on web server 
>>there are few pages which are hard coded with ip address so when I 
>>click on that link it tries to change the URL and my browser gives me 
>>error as that url is not accessible from internet.
>
>Can you just fix the html to remove the harcoded IP addresses?
>
>GV
>
>
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server
>Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Rewrite rules

Posted by James <ja...@hotmail.com>.
Well no that cannot be done. That's why I am asking for help.

james

-----Original Message-----
From: George Valpak [mailto:gvalpak@yahoo.com] 
Sent: 22 January 2003 01:54
To: users@httpd.apache.org; users@httpd.apache.org
Subject: Re: [users@httpd] Rewrite rules



At 01:41 AM 1/22/2003 +0000, James wrote:
>Hi,
>I want some help with rewrite rules.
>
>Following is what I want to achieve:
>I have one server with apache+mod_rewrite acting as a reverse proxy. 
>This server gets all its data from another web server. Now everything 
>works fine except one strange problem. In the software on web server 
>there are few pages which are hard coded with ip address so when I 
>click on that link it tries to change the URL and my browser gives me 
>error as that url is not accessible from internet.

Can you just fix the html to remove the harcoded IP addresses?

GV




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Rewrite rules

Posted by George Valpak <gv...@yahoo.com>.
At 01:41 AM 1/22/2003 +0000, James wrote:
>Hi,
>I want some help with rewrite rules.
>
>Following is what I want to achieve:
>I have one server with apache+mod_rewrite acting as a reverse proxy.
>This server gets all its data from another web server. Now everything
>works fine except one strange problem. In the software on web server
>there are few pages which are hard coded with ip address so when I click
>on that link it tries to change the URL and my browser gives me error as
>that url is not accessible from internet. 

Can you just fix the html to remove the harcoded IP addresses?

GV




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Basic CGI setup help needed

Posted by George Valpak <gv...@yahoo.com>.
At 07:29 PM 1/21/2003 -0800, Michael Olds wrote:
>You I would hire to check my setup! Live in the bay area?
>
>Thanks and,
>Best Wishes!
>Mike Olds www.buddhadust.org

I do :) In fact if the address in your domain's whois addresss is right, you can probably look down the hill and see the lights on my house in the mid distance right now. 

When you want a sysadmin type to check over you entire config, and make it easy for you to manage I am here for you ;) Like I said, if you've been tweaking for 3 months blindly, no telling what you will be left with.

And you can't honestly say if you read the docs everyone pointed you to, you didn't read that you should use -w and -T in your perl scripts, can you?

GV


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Basic CGI setup help needed

Posted by Gary Turner <kk...@sbcglobal.net>.
Michael Olds wrote:

>OK Gary,
>>So, anyway, worry about the script now and not the config.
>
>>Look for missing quotes, parentheses, etc.  Also add -wT and use strict.
>>You'll be forced to write cleaner, more "correct" code.

And I should have said safer code.

>
>I messed with the code...so as to end up with:
<snip>
>...forgot the use strict. But it worked. I proofread the original three
>times against the code in the book 
... 
>It must be that -wT, because I can't imagine having to put every tag
>on a separate line to make a cgi script work. I have half a dozen of these
>little test scripts and none of them are working
...
Nah, more likely a typo or some such.  Keep in mind that a 500 server
error with CGIs *generally*, not always, but generally means there is a
bug in the script---maybe in syntax, maybe in logic.

>You I would hire to check my setup! Live in the bay area?

Just send the $.02 American in certified funds.  Maybe after the
new-agers (and especially their music, god save us from Wyndham Hill,
Kenny G and John Tesh) and the celebrity experts slide into the Pacific,
I'll move to what's left :p  In the meantime, I'll stay a Texian. ;)

--
gt                  kk5st@sbcglobal.net
 If someone tells you---
 "I have a sense of humor, but that's not funny." 
                                  ---they don't.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Rewrite rules

Posted by James <ja...@hotmail.com>.
Hi,
I want some help with rewrite rules.

Following is what I want to achieve:
I have one server with apache+mod_rewrite acting as a reverse proxy.
This server gets all its data from another web server. Now everything
works fine except one strange problem. In the software on web server
there are few pages which are hard coded with ip address so when I click
on that link it tries to change the URL and my browser gives me error as
that url is not accessible from internet. I can only get to the reverse
proxy ip address.
Now I want all the url should be the ip address of the proxy. Even if
the software tries to get to some specific ip address it should be
internal not external. I mean my url should not change.

Following are my rewrite rules for reverse proxy:

ProxyPass         /  http://www1.foo.dom/
ProxyPassReverse  /  http://www1.foo.dom/ 

Please help

james

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Basic CGI setup follow-up

Posted by Michael Olds <Mi...@themozone.net>.
Just out of curiosity I changed back that code a bit at a time until it was
exactly as it started with the exception of the -wT
Can you explain why that would make such a difference, and why between say
my apache of three months ago and today? (Using the Debian Woody...stable
package they may have had one or two updates).

mo

-----Original Message-----
From: Michael Olds [mailto:MikeOlds@themozone.net]
Sent: Tuesday, January 21, 2003 7:29 PM
To: users@httpd.apache.org
Subject: RE: [users@httpd] Basic CGI setup help needed


OK Gary,
>So, anyway, worry about the script now and not the config.

>Look for missing quotes, parentheses, etc.  Also add -wT and use strict.
>You'll be forced to write cleaner, more "correct" code.

I messed with the code...so as to end up with:

<----------------->OK?<---------------------->
#!/usr/bin/perl -wT
#Environ.cgi - Show environment variables set by the server
#

print    "Content-type: text/html\n\n";
print    "<HTML>

         <HEAD>
         <TITLE>
         Environment Variables
         </TITLE>
         </HEAD>

         <BODY>";
print    "Environment Variables:";
foreach $evar( keys (%ENV)){
   print "<B>$evar:</B> $ENV{$evar}<BR>";
}
print "</BODY></HTML>\n";
<------------------------->
...forgot the use strict. But it worked. I proofread the original three
times against the code in the book I copied it from: Hunt: Linux, Apache Web
Server Administration, page 227...and as I mentioned previously this very
script was working previously. (I checked, I am uploading in ASCII, not
binary) It must be that -wT, because I can't imagine having to put every tag
on a separate line to make a cgi script work. I have half a dozen of these
little test scripts and none of them are working...OK, I'll let it go. At
least I have a new idea to work with.

You I would hire to check my setup! Live in the bay area?

Thanks and,
Best Wishes!
Mike Olds www.buddhadust.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Basic CGI setup help needed

Posted by Michael Olds <Mi...@themozone.net>.
OK Gary,
>So, anyway, worry about the script now and not the config.

>Look for missing quotes, parentheses, etc.  Also add -wT and use strict.
>You'll be forced to write cleaner, more "correct" code.

I messed with the code...so as to end up with:

<----------------->OK?<---------------------->
#!/usr/bin/perl -wT
#Environ.cgi - Show environment variables set by the server
#

print    "Content-type: text/html\n\n";
print    "<HTML>

         <HEAD>
         <TITLE>
         Environment Variables
         </TITLE>
         </HEAD>

         <BODY>";
print    "Environment Variables:";
foreach $evar( keys (%ENV)){
   print "<B>$evar:</B> $ENV{$evar}<BR>";
}
print "</BODY></HTML>\n";
<------------------------->
...forgot the use strict. But it worked. I proofread the original three
times against the code in the book I copied it from: Hunt: Linux, Apache Web
Server Administration, page 227...and as I mentioned previously this very
script was working previously. (I checked, I am uploading in ASCII, not
binary) It must be that -wT, because I can't imagine having to put every tag
on a separate line to make a cgi script work. I have half a dozen of these
little test scripts and none of them are working...OK, I'll let it go. At
least I have a new idea to work with.

You I would hire to check my setup! Live in the bay area?

Thanks and,
Best Wishes!
Mike Olds www.buddhadust.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Basic CGI setup help needed

Posted by Gary Turner <kk...@sbcglobal.net>.
Michael Olds wrote:


<snip>
>
>Error message:
>Internal Server Error, and the log file gives Premature End of Script
>Headers
>

OK.  Looks like config is working.  What you have now is an error in the
Perl script itself.  When I pasted your script into my machine, I got
the same error.  Without thinking, I fooled with it a bit and now it
runs.  Trouble is, I have stared at it for too long and can't see why.(I
did simplify the HTML, and reformat to put each tag on its own line.

So, anyway, worry about the script now and not the config.

Look for missing quotes, parentheses, etc.  Also add -wT and use strict.
You'll be forced to write cleaner, more "correct" code.
--
gt                  kk5st@sbcglobal.net
 If someone tells you---
 "I have a sense of humor, but that's not funny." 
                                  ---they don't.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Basic CGI setup help needed

Posted by George Valpak <gv...@yahoo.com>.
At 05:14 PM 1/21/2003 -0800, Michael Olds wrote:
>Perhaps, having invested months in not getting this basic configuration to
>work, it is time to consider paying someone (moi???) to straighten out your
>mess quickly. There are a zillion pointers on how to set up cgi available,
>and they are not really that complicated. It shouldn't take more than a
>couple of days under the worst circumstances.
>
>If you have been tweaking this for months than I am sure you have many times
>gone past what Robert Pirsig called "gumption checks" in "The Zen of
>Motorcycle Maintenance". It may be time to start over with a fresh approach
>instead of continuing to bang your head against it.
>
>
><-------------------->
>
>Great, of three replies two are calling me an idiot and one is asking for
>money. 

I'm not asking for money. I *am* suggesting you consider the value of your time, and if this is the most important step in your bigger project. It seems to be a showstopper unnecessarily.

I concur with all the advice given you already - that you likely have permission problems, and if you have been tweaking it for months without understanding, you have probably hosed lots of other little stuff too. That is the nature of tweaking configs, it happens to all of us.

You have already received excellent advice on the list. It seems to be your limitations, not ours, that are the limiting factor here, wouldn't you agree? After all, we have working servers and you don't. That doesn't make you an idiot, but it does put you on the outer edges of the expected amount of time and trouble to get this working.

Therefore, you need another solution. Without providing a lot more specifics than it seems you are prepared to give, it is not fair for you to continue to ask us to guess along with you, when many of us are capable of diagnosing and fixing your system rapidly if we had access to it. We could even teach you what we found out once we were done so you could learn something :) 

But that moves out of the realm of a hobby of helping on the list, and into our professional lives. If your house was flooded for months, you might fairly expect a random plumber to tell you go to Home Depot and get this simple widget. If you tried that and didn't solve the problem, you wouldn't expect any plumber you found on the net to keep telling you the same thing, nor would you expect them to fix it for free. Same principle here. 

>I can't imagine paying money to someone who cannot grasp the nature
>of the problem I described in fair detail. 

You clearly have not described it in sufficient detail to diagnose your problems, or you would have a working server by now. Yours is essentially an FAQ, answered a million times thoroughly. In addition to specific things to try, you have been pointed to the documentation, yet *you*, not *us* have not been able to get it to work. I understand you are frustrated. That is why I suggested a different approach. 

>I imagine I too could solve this
>problem in about three hours by simply starting from scratch. 

Probably. Only reason I didn't suggest that before is I assumed the server was being used for something else already, and simply reinstalling Linux or even just Apache was not an option. If it is an option, then you should consider it. You will probably have a working server much sooner than continuing to tweak, and you would be sure that, even if you got it to work by tweaking, that you haven't left 3 months of trial and error behind that might come back to haunt you later.


>But this is
>supposed to be a help forum, not a barrel in which the new fish get shot at,

You asked an FAQ, you got the standard answers and more. It wasn't enough for you despite the tried and true experience of others using the same answers. Maybe you have 3 more months to worry about this,but no one else here does.

>and I thought I might find a clue here as to where I might look outside of
>the "docs" for a solution.

The solutions are in the docs. Your question is especially well documented. No need to look elsewhere. If you want to look elsewhere, I volunteered for you to look in my direction. Either you want outside help or you don't. Make up your mind.

> I would consider paying someone to check out the
>system for the mistakes I don't notice after I have it set up. Such a one
>would have shown me his skill at solving the problems I can see I have.

So if we solve your problem, you will pay someone to solve your problem you no longer have? How about the fact that we are running or have run up to hundreds of apache servers built from scratch (in my case anyway)? I didn't suggest you pay me first before I fixed your problem you know. I didn't even raise the issue of price.

>Someone who tells me that he could solve the problem in a fingersnap for
>money on a help forum isn't someone I would ever hire for anything.

Why not? We know what a proper configuration looks like in detail. Once we had access to your machine, we could compare the existing configuration with what it should be. This is called differential diagnosis. It is the skill that is the difference between your doctor and your local school nurse. If you wanted to make the actual changes yourself, after I were to diagnose the problem, hey, fine by me. But it is the info that is needed to make the diagnosis that is missing in your case from your descriptions of it to the list.

There is an alternative if you wanted lots of free diagnosis help from the list. I don't recommend it, but you can consider it if you want - it's a free world - make sure telnet is available on your machine and post the root password.  Someone (not me) would have your machine running Apache just fine in no time at no monetary cost to you at all.

>Best Wishes!
>Mike Olds www.buddhadust.org


I prefer to take a more Zen approach to my servers myself :) If you breathe right and let go of the desire for a specific outcome, then config issues tend to clear themselves up :)

Sorry if you were upset by my earlier response but it was that "I've been tweaking this for 3 months" that got me. If you said 3 days I wouldn't have even commented at all. In the Zen spirit I can't make myself your teacher, but if you come around looking for help, you know how to find me.



GV


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Basic CGI setup help needed

Posted by Michael Olds <Mi...@themozone.net>.
Perhaps, having invested months in not getting this basic configuration to
work, it is time to consider paying someone (moi???) to straighten out your
mess quickly. There are a zillion pointers on how to set up cgi available,
and they are not really that complicated. It shouldn't take more than a
couple of days under the worst circumstances.

If you have been tweaking this for months than I am sure you have many times
gone past what Robert Pirsig called "gumption checks" in "The Zen of
Motorcycle Maintenance". It may be time to start over with a fresh approach
instead of continuing to bang your head against it.


<-------------------->

Great, of three replies two are calling me an idiot and one is asking for
money. I can't imagine paying money to someone who cannot grasp the nature
of the problem I described in fair detail. I imagine I too could solve this
problem in about three hours by simply starting from scratch. But this is
supposed to be a help forum, not a barrel in which the new fish get shot at,
and I thought I might find a clue here as to where I might look outside of
the "docs" for a solution. I would consider paying someone to check out the
system for the mistakes I don't notice after I have it set up. Such a one
would have shown me his skill at solving the problems I can see I have.
Someone who tells me that he could solve the problem in a fingersnap for
money on a help forum isn't someone I would ever hire for anything.

Best Wishes!
Mike Olds www.buddhadust.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Basic CGI setup help needed

Posted by George Valpak <gv...@yahoo.com>.
Perhaps, having invested months in not getting this basic configuration to work, it is time to consider paying someone (moi???) to straighten out your mess quickly. There are a zillion pointers on how to set up cgi available, and they are not really that complicated. It shouldn't take more than a couple of days under the worst circumstances. 

If you have been tweaking this for months than I am sure you have many times gone past what Robert Pirsig called "gumption checks" in "The Zen of Motorcycle Maintenance". It may be time to start over with a fresh approach instead of continuing to bang your head against it.

GV



At 04:15 PM 1/21/2003 -0800, Michael Olds wrote:
>I am not an old hand, but I am not just starting off. I have plenty of
>experience with computers and have been at the Linux thing now for the
>better part of a year. I have been working on this one issue for a couple of
>months.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Basic CGI setup help needed

Posted by Michael Olds <Mi...@themozone.net>.
Corp,

>This is a case of you just not paying attention

Thank you,

The ###s are not in the script, and why would I want to do something to
confuse you? I just put them in to delimit the script from the rest of the
note.

I am not an old hand, but I am not just starting off. I have plenty of
experience with computers and have been at the Linux thing now for the
better part of a year. I have been working on this one issue for a couple of
months.

I may be wrong, but I do not believe AddHandler is needed when you
ScriptAlias. As I read it ScriptAlias is one way of calling the cgi handler.

And I mentioned that I had been trying every combination of
users/groups/permissions I could think of ...I have gone through thousands
of combinations. It isn't really helpful to say "it's a permissions thing."
If you really think it could be a permissions thing, tell me what should
work. I'll tell you I've already tried that (and I will try it again).


Best Wishes!
Mike Olds www.buddhadust.org

<------------------->

Remove the ###### on the top. I have never seen any examples in any doc or
books like this, and I am sure you haven't either. Look for the simple
things. If you are just starting off, then follow the directions and the
examples. This is a case of you just not paying attention.

And if your script does not have the #'s before the path to the
interpreter(and just added it in your email to confuse us), then look into
AddHandler and/or permissions on the script.


On Tue, 21 Jan 2003, Michael Olds wrote:

> Hello again,
>
> I could really use some help on this. (Please don't send me to the docs. I
> have read the docs over and over, I have also got two books on Apache
server
> administration which I have read and followed carefully...this is a basic
> issue that has some kind of problem). At this time I have once more run
out
> of variables to test in my epic attempt to set up a simple working cgi-bin
> on my Debian Woody. I have just completed what I think is a fresh install
of
> apache. I uninstalled apache and apache-common after renaming /etc/apache
> and /usr/lib/apache. The reinstall (package, not source) seems to be ok
(no
> errors) and I am able to serve files from my two VirtualHosts, including a
> complex php/mysql script. I cannot get a simple test.cgi:
> ############################################
> #!/usr/bin/perl
> print "Content-type: text/html\n\n";
> print "<html><head><title>Environment Variables</title></head><body>";
> print "<h2>Environment Variables:</h2>";
> print "<hr>\n";
> foreach $evar( keys (%ENV)){
>    print "<b>$evar:</b> $ENV{$evar}<br />";
> }
> print "</body></html>\n";
> #############################################
>
> to run -- I have tried others, and the path to Perl is correct (unless
there
> is something going on with versions of perl...I have three, two later than
> "perl" "perl-5.6" and "perl5.6.1").
>
> The default enabled LoadModule cgi_module...
>
> Error message:
> Internal Server Error, and the log file gives Premature End of Script
> Headers
>
> I have an almost default httpd.conf. I have changed the DocumentRoot to
> /www/websites
> and set the ScriptAlias to /cgi-bin/ /www/cgi-bin/
> with
> <Directory /www/cgi-bin/>
>    AllowOverride none
>    Options ExecCGI
>    Order allow,deny
>    Allow from all
> </Directory>
> (not copied and pasted, the only thing changed from the default was the
> directory path)
>
> I have user and group www-data (the Debian default)
> Perms: user/group: root /cgi-bin/ rwx-rwx-rx
>       user/group: me/www-data /sub-directory/ rwx-rwx-rx
>       user/group: me/www-data /test.cgi rwx-rwx-r-x
> (I have tried all kinds and varieties of perms/users/groups this is just
the
> latest)
>
> This is a Debian setup so suEXEC is enabled by default. I have tried it
> dis-abled by changing the name to suexec-not. (apache -l tells me it is
> disabled) Enabled or disabled makes no difference. suEXEC is not
generating
> any log.
>
> CGI was working on this server a while back, under the DocumentRoot of the
> first VirtualHost, ScriptAliased from within the VirtualHost, but I cannot
> even get it to work that way any longer.
> The only thing I can think of at this point is that there is something
else,
> non-apache/non-cgi/non-permissions related, that is not working, but I
have
> no idea what that might be or of how to test for what it might be. I am
new
> enough to have missed something basic. A missing module? If this is
related
> to my setup a clue may be that one other thing that I absolutely cannot
get
> to work is a printer.
>
>
> Best Wishes!
> Mike Olds www.buddhadust.org
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Basic CGI setup help needed

Posted by Corp <ec...@corp.electracide.net>.
Remove the ###### on the top. I have never seen any examples in any doc or
books like this, and I am sure you haven't either. Look for the simple
things. If you are just starting off, then follow the directions and the
examples. This is a case of you just not paying attention.

And if your script does not have the #'s before the path to the
interpreter(and just added it in your email to confuse us), then look into
AddHandler and/or permissions on the script.


On Tue, 21 Jan 2003, Michael Olds wrote:

> Hello again,
> 
> I could really use some help on this. (Please don't send me to the docs. I
> have read the docs over and over, I have also got two books on Apache server
> administration which I have read and followed carefully...this is a basic
> issue that has some kind of problem). At this time I have once more run out
> of variables to test in my epic attempt to set up a simple working cgi-bin
> on my Debian Woody. I have just completed what I think is a fresh install of
> apache. I uninstalled apache and apache-common after renaming /etc/apache
> and /usr/lib/apache. The reinstall (package, not source) seems to be ok (no
> errors) and I am able to serve files from my two VirtualHosts, including a
> complex php/mysql script. I cannot get a simple test.cgi:
> ############################################
> #!/usr/bin/perl
> print "Content-type: text/html\n\n";
> print "<html><head><title>Environment Variables</title></head><body>";
> print "<h2>Environment Variables:</h2>";
> print "<hr>\n";
> foreach $evar( keys (%ENV)){
>    print "<b>$evar:</b> $ENV{$evar}<br />";
> }
> print "</body></html>\n";
> #############################################
> 
> to run -- I have tried others, and the path to Perl is correct (unless there
> is something going on with versions of perl...I have three, two later than
> "perl" "perl-5.6" and "perl5.6.1").
> 
> The default enabled LoadModule cgi_module...
> 
> Error message:
> Internal Server Error, and the log file gives Premature End of Script
> Headers
> 
> I have an almost default httpd.conf. I have changed the DocumentRoot to
> /www/websites
> and set the ScriptAlias to /cgi-bin/ /www/cgi-bin/
> with
> <Directory /www/cgi-bin/>
>    AllowOverride none
>    Options ExecCGI
>    Order allow,deny
>    Allow from all
> </Directory>
> (not copied and pasted, the only thing changed from the default was the
> directory path)
> 
> I have user and group www-data (the Debian default)
> Perms: user/group: root /cgi-bin/ rwx-rwx-rx
>       user/group: me/www-data /sub-directory/ rwx-rwx-rx
>       user/group: me/www-data /test.cgi rwx-rwx-r-x
> (I have tried all kinds and varieties of perms/users/groups this is just the
> latest)
> 
> This is a Debian setup so suEXEC is enabled by default. I have tried it
> dis-abled by changing the name to suexec-not. (apache -l tells me it is
> disabled) Enabled or disabled makes no difference. suEXEC is not generating
> any log.
> 
> CGI was working on this server a while back, under the DocumentRoot of the
> first VirtualHost, ScriptAliased from within the VirtualHost, but I cannot
> even get it to work that way any longer.
> The only thing I can think of at this point is that there is something else,
> non-apache/non-cgi/non-permissions related, that is not working, but I have
> no idea what that might be or of how to test for what it might be. I am new
> enough to have missed something basic. A missing module? If this is related
> to my setup a clue may be that one other thing that I absolutely cannot get
> to work is a printer.
> 
> 
> Best Wishes!
> Mike Olds www.buddhadust.org
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org