delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/05/07/15:14:05

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding
:in-reply-to; q=dns; s=default; b=hpF7clKQVPmfLTqq/J0vnegMLxRWHx
ru7ycbFdGfnhtb5xYpC/+Qv9YMd4TUO5Wf5f8oLeQPuKoQvfbSheeZx2XUKmux7k
hRzhL7TGeG/gVZNan0gp2tHwGGCr3NJg7qrUcwJ+2fupgyptYN3yyFzX068FCi/H
zw/46kJml0/FI=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding
:in-reply-to; s=default; bh=Vcno4Ow6fOFtqEzMPOs7uSA56kw=; b=pf5a
zUzA8Rx1Q8os24erM8LQ9n37w8hg0DcXnOomqfnauAfBYt+w0Btbv66zYPbz3qK0
XykM2TwJ3sUwjhSeg4Xk2ITyic89xXRT2bHM+WJwvAZpHHiQCQZXb1dnIZ4Ko8R0
0cJ8yk2tA0xCL6tDMRyBVw0W/F3rTXnGGbyik6g=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,T_FSL_HELO_BARE_IP_2 autolearn=no version=3.3.2
X-HELO: plane.gmane.org
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: Setting up Apache2 with mod_perl and Apache2::AuthCookieLDAP
Date: Wed, 07 May 2014 12:13:34 -0700
Lines: 59
Message-ID: <lke0ku$f3t$1@ger.gmane.org>
References: <lk9hbp$ogl$1 AT ger DOT gmane DOT org> <8510060002 DOT 20140507172342 AT yandex DOT ru>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
In-Reply-To: <8510060002.20140507172342@yandex.ru>
X-IsSubscribed: yes

On 5/7/2014 6:23 AM, Andrey Repin wrote:
>> Goal: Set up Apache2 on my Windows laptop with mod_perl working as well
>> as Apache2::AuthCookieLDAP and write an example login page that
>> authenticates to Active Directory using AuthCookieLDAP.
>
> Little bit OT: Is this necessary to set up Cygwin Apache/Perl?

I view my development environment as "Linux". When I don't have bona 
fide Linux at my fingertips and they shove a Windows box under my 
keyboard I rely on Cygwin to provide a "Linux-like" environment. True 
it's not strictly "necessary" to set up a Cygwin Apache/Perl but it is 
what I'm best familiar and comfortable with.

>> First problem (minor): I can't figure out how to install Apache2 as a
>> Windows service. For now I can just do apachectl2 start but would like
>> to configure it as a real service. I've tried:
>
>> Adefaria-lt:cygrunsrv -I httpd2 -d 'CYGWIN Apache2' -p
>> /usr/sbin/httpd2.exe -a '-DNO_DETACH'
>> Adefaria-lt:net start httpd2
>> The CYGWIN Apache2 service is starting.
>> The CYGWIN Apache2 service could not be started.
>
>> The service did not report an error.
>
> What's in Apache logs?

Nothing!

> I suspect Apache was running at the time.

I just checked. Shut down Apache. Cleared the logfiles. Did net start 
httpd2. Errored out. Checked the logs - they're empty.

>> Adefaria-lt:grep -i 'addhandler cgi-script' /etc/apache2/httpd.conf
>>       AddHandler cgi-script .cgi .pl
>> Adefaria-lt:cat ~/web/test.pl
>> #!/usr/bin/perl
>
> It is long (like, 10-15 years long) since recommended to use filters instead
> of handlers.
> I.e.
> AddOutputFilter Perl .pl
> AddInputFilter Perl .pl

I've always just used the handler.

>> print "Content-type: text/html\n\n";
>
> print "Content-type: text/html\r\n\r\n";
>
> Read http://tools.ietf.org/html/rfc2616#section-4 pretty please.

Normally I use CGI and call start_html. This script I just grabbed off 
the net as a simple test. Note that LF works just find and CRLF does not 
seem to be required.
-- 
Andrew DeFaria
http://defaria.com


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019