You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andrew M <an...@jibeya.com> on 2004/11/30 18:43:59 UTC

https on a cocoon form

Hi,
I am using flowscript and wondered whether is is possible to set https 
on in flowscript before I call sendPage / sendPageAndWait?

So for example:

cocoon.sendPageAndWait("takeCreditCardDetails.xml", 
{"artistID":artistID,"artist_name":artist_name,"userID":userID});

directs the user to https://www.mysite.com/takeCreditCardDetails.xml

thanks

Andrew


Re: https on a cocoon form

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 1 déc. 04, à 09:39, Andrew M a écrit :

> [Wed Dec 01 08:25:45 2004] [notice] Apache/2.0.52 (Unix) 
> mod_ssl/2.0.52 OpenSSL/0.9.7b DAV/2 PHP/4.3.9 mod_jk2/2.0.3-dev 
> configured -- resuming normal operations
>
> So it would seem like ssl is ready to go!?

Can't tell really, I don't have all this in mind. You might be more 
lucky searching in apache-specific lists.

-Bertrand

Re: https on a cocoon form

Posted by Andrew M <an...@jibeya.com>.
Ah.... didn't check the log file properly. The earlier error line I 
mentioned is immediately followed by:

[Wed Dec 01 08:25:45 2004] [notice] Apache/2.0.52 (Unix) mod_ssl/2.0.52 
OpenSSL/0.9.7b DAV/2 PHP/4.3.9 mod_jk2/2.0.3-dev configured -- resuming 
normal operations

So it would seem like ssl is ready to go!?

regards


Andrew
On 1 Dec 2004, at 08:30, Andrew M wrote:

> The only message I get concerning SSL is located in the error_log file:
>
> [Wed Dec 01 08:25:45 2004] [notice] LDAP: SSL support unavailable
>
> This was after I had commented out the IfModule tags in http.conf so 
> as to force ssl into action. Is there a terminal window command I can 
> use to see whether:
>
> 1. SSL is available as a service in my current build
> 2. How to make it available if it is part of my current build
>
> again, many thanks for your help with this
>
>
> Andrew
>
> On 1 Dec 2004, at 08:17, Bertrand Delacretaz wrote:
>
>> Le 1 déc. 04, à 09:04, Andrew M a écrit :
>>
>>> <IfModule mod_ssl.c>
>>>     Include conf/ssl.conf
>>> </IfModule>
>>
>> This will not be executed if the SSL module is not loaded for any 
>> reason, you should have a look at your httpd log files to see if 
>> there are any complaints about SSL.
>>
>> Or put something blatantly wrong here
>>
>>> <IfModule mod_ssl.c>
>>>     Include conf/ssl.conf
>>        SomeWeirdInvalidErrorTriggeringStatementHereYouGetTheIdea
>>> </IfModule>
>>
>> to check if the IfModule is indeed activated
>>
>> -Bertrand
>>
>
>

Re: https on a cocoon form

Posted by Andrew M <an...@jibeya.com>.
The only message I get concerning SSL is located in the error_log file:

[Wed Dec 01 08:25:45 2004] [notice] LDAP: SSL support unavailable

This was after I had commented out the IfModule tags in http.conf so as 
to force ssl into action. Is there a terminal window command I can use 
to see whether:

1. SSL is available as a service in my current build
2. How to make it available if it is part of my current build

again, many thanks for your help with this


Andrew

On 1 Dec 2004, at 08:17, Bertrand Delacretaz wrote:

> Le 1 déc. 04, à 09:04, Andrew M a écrit :
>
>> <IfModule mod_ssl.c>
>>     Include conf/ssl.conf
>> </IfModule>
>
> This will not be executed if the SSL module is not loaded for any 
> reason, you should have a look at your httpd log files to see if there 
> are any complaints about SSL.
>
> Or put something blatantly wrong here
>
>> <IfModule mod_ssl.c>
>>     Include conf/ssl.conf
>        SomeWeirdInvalidErrorTriggeringStatementHereYouGetTheIdea
>> </IfModule>
>
> to check if the IfModule is indeed activated
>
> -Bertrand
>


Re: https on a cocoon form

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 1 déc. 04, à 09:04, Andrew M a écrit :

> <IfModule mod_ssl.c>
>     Include conf/ssl.conf
> </IfModule>

This will not be executed if the SSL module is not loaded for any 
reason, you should have a look at your httpd log files to see if there 
are any complaints about SSL.

Or put something blatantly wrong here

> <IfModule mod_ssl.c>
>     Include conf/ssl.conf
        SomeWeirdInvalidErrorTriggeringStatementHereYouGetTheIdea
> </IfModule>

to check if the IfModule is indeed activated

-Bertrand

Re: https on a cocoon form

Posted by Andrew M <an...@jibeya.com>.
Bertrand,
in my last post for which I included both my ssl.conf and my http.conf 
files, the http.conf file includes the ssl.conf file like so:

#
# Bring in additional module-specific configurations
#
<IfModule mod_ssl.c>
     Include conf/ssl.conf
</IfModule>


### Section 3: Virtual Hosts

and in my ssl.conf file the following line is declared:

Listen 443

Any further ideas?

thanks for the help

Andrew


On 1 Dec 2004, at 07:56, Bertrand Delacretaz wrote:

> Le 1 déc. 04, à 08:48, Andrew M a écrit :
>
>> ...Suffice to say, when I enter https://www.mysite.com into the url I 
>> get 'the connection was refused when attempting to contact 
>> www.mysite.com'. What am I doing wrong???..
>
> Most probably your server is not listening on the https port (443).
>
> I don't have the details in mind, but IIRC you need a "listen 443" 
> statement somewhere in the httpd.conf, and/or start httpd with a -ssl 
> option.
>
> A very good reference for that kind of stuff is the "apache cookbook", 
> http://apache-cookbook.com/. But I don't have it handy, it's at the 
> office ;-(
>
> -Bertrand
>

Re: https on a cocoon form

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 1 déc. 04, à 08:48, Andrew M a écrit :

> ...Suffice to say, when I enter https://www.mysite.com into the url I 
> get 'the connection was refused when attempting to contact 
> www.mysite.com'. What am I doing wrong???..

Most probably your server is not listening on the https port (443).

I don't have the details in mind, but IIRC you need a "listen 443" 
statement somewhere in the httpd.conf, and/or start httpd with a -ssl 
option.

A very good reference for that kind of stuff is the "apache cookbook", 
http://apache-cookbook.com/. But I don't have it handy, it's at the 
office ;-(

-Bertrand

Re: https on a cocoon form

Posted by Andrew M <an...@jibeya.com>.
Bertrand,
I am using Apache 2.0.52 and have made the following amendments:

1. create a certificate file : /library/Apache2/conf/mysiteNew.crt
2. create a key file: /library/Apache2/conf/www.mysite.com.key
3. Amend the ssl.conf file:

<IfDefine SSL>
<VirtualHost 127.0.0.1:443>
......
SSLCertificateFile /Library/Apache2/conf/mysiteNew.crt
SSLCertificateKeyFile /Library/Apache2/conf/www.mysite.com.key

****** Start Note  ***
RewriteEngine on

RewriteRule "^/WEB-INF/?(.*)" "$0" [L,F,NC]
RewriteRule "^/(.*)\.gif$" "$0" [L]
RewriteRule "^/(.*)\.jpg$" "$0" [L]
RewriteRule "^/(.*)\.swf$" "$0" [L]
RewriteRule "^/(.*)\.php$" "$0" [L]
RewriteRule "^/(.*)\.m3u$" "$0" [L]
RewriteRule "^/(.*)\.mp3$" "$0" [L]
RewriteRule "^/(.*)\.html$" "$0" [L]
RewriteRule (.*)\.(js|css|xml|xsl|kont|jx|xsp|svg)$ 
http://localhost:8080/mysite/$1.$2 [P,L]
RewriteRule "^/(.*)" "http://localhost:8080/$1" [P]
ProxyPassReverse / http://localhost:8080/
***End  Note ***
</virtualHost>
</IfDefine>

Suffice to say, when I enter https://www.mysite.com into the url I get 
'the connection was refused when attempting to contact www.mysite.com'. 
What am I doing wrong???

many thanks

Andrew


Re: https on a cocoon form

Posted by Bertrand Delacretaz <bd...@apache.org>.
> ...How would I, in this instance, be able to do what you recommended? 
> Bare with me if this seems fairly obvious as I have never worked with 
> https before...

My setup is a bit different, I have documented it at
http://wiki.apache.org/cocoon/ApacheModProxySsl

I haven't explained the basic SSL configuration of the Apache web 
server, but there are plenty of docs floating around for this.

-Bertrand

Re: https on a cocoon form

Posted by Andrew M <an...@jibeya.com>.
Bertrand,
I currently have apache sitting at the front end passing requests to 
jboss on port 8080 like so in my http.conf:

# mod_jk2 configuration
LoadModule jk2_module modules/mod_jk2.so

# for jboss
RewriteEngine on

RewriteRule "^/WEB-INF/?(.*)" "$0" [L,F,NC]
RewriteRule "^/(.*)\.gif$" "$0" [L]
RewriteRule "^/(.*)\.jpg$" "$0" [L]
RewriteRule "^/(.*)\.swf$" "$0" [L]
RewriteRule "^/(.*)\.php$" "$0" [L]
RewriteRule "^/(.*)\.m3u$" "$0" [L]
RewriteRule "^/(.*)\.mp3$" "$0" [L]
RewriteRule "^/(.*)\.html$" "$0" [L]
RewriteRule (.*)\.(js|css|xml|xsl|kont|jx|xsp|svg)$ 
http://localhost:8080/mysite/$1.$2 [P,L]
RewriteRule "^/(.*)" "http://localhost:8080/$1" [P]
ProxyPassReverse / http://localhost:8080/

How would I, in this instance, be able to do what you recommended? Bare 
with me if this seems fairly obvious as I have never worked with https 
before.

many thanks


Andrew

On 30 Nov 2004, at 18:07, Bertrand Delacretaz wrote:

> Le 30 nov. 04, à 18:43, Andrew M a écrit :
>
>> ...I am using flowscript and wondered whether is is possible to set 
>> https on in flowscript before I call sendPage / sendPageAndWait?
>
> I'd recommend using a front-end httpd server with mod_proxy for https, 
> it's the easiest and cleanest way IMHO.
>
> See http://wiki.apache.org/cocoon/ApacheModProxy, with such a setup 
> you can use the standard https config for httpd.
>
> -Bertrand
>


Re: https on a cocoon form

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 30 nov. 04, à 18:43, Andrew M a écrit :

> ...I am using flowscript and wondered whether is is possible to set 
> https on in flowscript before I call sendPage / sendPageAndWait?

I'd recommend using a front-end httpd server with mod_proxy for https, 
it's the easiest and cleanest way IMHO.

See http://wiki.apache.org/cocoon/ApacheModProxy, with such a setup you 
can use the standard https config for httpd.

-Bertrand