This is the mail archive of the
mailing list for the Cygwin project.
Re: Setting up Apache2 with mod_perl and Apache2::AuthCookieLDAP
- From: Andrew DeFaria <Andrew at DeFaria dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 07 May 2014 12:13:34 -0700
- Subject: Re: Setting up Apache2 with mod_perl and Apache2::AuthCookieLDAP
- Authentication-results: sourceware.org; auth=none
- References: <lk9hbp$ogl$1 at ger dot gmane dot org> <8510060002 dot 20140507172342 at yandex dot ru>
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?
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
It is long (like, 10-15 years long) since recommended to use filters instead
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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple