1 2 Previous Next 16 Replies Latest reply: Jan 29, 2014 2:41 AM by ApexPhil RSS

How to configure Oracle XE with Apache and SSL ?

1012981 Newbie
Currently Being Moderated

Hi,

 

Our environment is Windows. We have Oracle 10g XE installed on it with APEX 4.2 configured on EPG. We need to secure application with SSL support.

 

 

Any one please HELP!!! ITS URGENT.

  • 1. Re: How to configure Oracle XE with Apache and SSL ?
    Bas de Klerk Pro
    Currently Being Moderated

    Hi,

     

    you need to configure apache as a reverse proxy (with ssl on the outbound side ).

     

    If you google apache reverse proxy ssl there are plenty of examples how you need to configure this, so all you need to do is convert the traffic on port 8080 (default APEX) to SSL on 443. In the end this is an apache question and has very little to do with oracle/apex.

    I will try to post the reverse proxy config for apache when I have access to my servers where I have this running.

     

    Cheers

      Bas


  • 2. Re: How to configure Oracle XE with Apache and SSL ?
    Bas de Klerk Pro
    Currently Being Moderated

    httpd.conf should contain a config section like below. SSL needs to be configured.

     

     

    #########################################                                     

    #### XXX: BEGIN EDIT FOR MOD_REWRITE ####                                     

    #### This is intended to force HTTPS ####                                     

    #### for all inbound HTTP requests ####                                       

                                                                                  

    ####                                                                          

    # This module (mod_rewrite) simply tells Apache2 that all connections to      

    # port 80 need to go to port 443 . SSL . No exceptions                        

    ####                                                                          

                                                                                  

    <IfModule !mod_rewrite.c>                                                     

    LoadModule rewrite_module modules/mod_rewrite.so                              

    </IfModule>                                                                   

    <IfModule mod_rewrite.c>                                                      

    RewriteEngine on                                                              

                                                                                  

    ####                                                                          

    # The line below sets the rewrite condition for mod_rewrite.so.               

    # That is, if the server port does not equal 443, then this condition is true 

    ####                                                                          

                                                                              

    ReWriteCond %{SERVER_PORT} !^443$                                             

    RewriteRule ^/(.*) https://%{HTTP_HOST}/apex/f?p=4550 [NC,R,L]                 

    RewriteRule / https://%{HTTP_HOST}/apex/f?p=4550 [NC,R,L]                      

    </IfModule>                                                                   

                                                                                  

                                                                                  

    #### XXX: END EDIT FOR MOD_REWRITE ####  

    #

    # Proxy Server directives. Uncomment the following lines to

    # enable the proxy server:

    #

    #<IfModule mod_proxy.c>

    #Bas de Klerk 08092011 reverse proxy

    ProxyRequests Off

    #

    <Proxy *>

        Order deny,allow

        Allow from all

    </Proxy>

    ProxyPass / http://{HTTP_HOST}:8080/

    ProxyPassReverse / http://{HTTP_HOST}:8080/

                                        

  • 3. Re: How to configure Oracle XE with Apache and SSL ?
    1012981 Newbie
    Currently Being Moderated

    Hi BasdeKlerk,

    Thank you for your reply.


    We have installed Apache, when we try to set the VirtualHost (see below) we are unable to start the Apache.


    <VirtualHost *:80>

    ServerAdmin admin@yourdomain.com

    DocumentRoot /home/yourdomain.com/htdocs

    ServerName yourdomain.com

    ServerAlias www.yourdomain.com

    ErrorLog logs/yourdomain.com-error_log

    CustomLog logs/yourdomain.com-access_log common

    RewriteEngine On

     

    RewriteRule ^/$ apex/f?p=101:1 [R=301]

     

    ProxyRequests Off

    < Proxy *>

    Order allow,deny

    Allow from all

    < /Proxy>

    ProxyPass / http://localhost:8080/

    ProxyPassReverse / http://localhost:8080/

    < /VirtualHost>


    we are generating SSL certificate. Following below link to do the same  

    How to generate Certificate Signing Request (CSR) file with Apache OpenSSL


    Thanks & Regards

    Sairam


  • 4. Re: How to configure Oracle XE with Apache and SSL ?
    jariola Guru
    Currently Being Moderated

    1012981 wrote:

    We have installed Apache, when we try to set the VirtualHost (see below) we are unable to start the Apache.

    Hi,

     

    What is error message? Check Apache logs.

     

    PS: I do not see this question relates anyhow to Oracle products. Are you posting in right forum?

     

    Regards,
    Jari

  • 5. Re: How to configure Oracle XE with Apache and SSL ?
    1012981 Newbie
    Currently Being Moderated

    Hi All,

     

      Downloaded and Installed Apache

      Generated key for Open SSL

      Generated Certificate

      Modified the httpd.conf and SSL.conf

      When we type ‘mydomain.com’, the URL is redirecting to ‘https://mydomine/apex/f?p=100:1’. But the page is not loading (Unable to connect).

     

    Can any one help on this.

     

    Regards,

    Sairam.

  • 6. Re: How to configure Oracle XE with Apache and SSL ?
    jariola Guru
    Currently Being Moderated

    Hi,

     

    Seems still problem in Apache configuration.

     

    You have modify config files. How?

    And did you check log files?

     

    Here is HTTPD site where you can find documentation

    Welcome! - The Apache HTTP Server Project

     

    Regards,

    Jari

  • 7. Re: How to configure Oracle XE with Apache and SSL ?
    1012981 Newbie
    Currently Being Moderated

    Hi All,

     

      Downloaded and Installed Apache

      Generated key for Open SSL

      Generated Certificate

      Modified the httpd.conf and SSL.conf

      When we type ‘mydomain.com’, the URL is redirecting to ‘https://mydomine/apex/f?p=100:1’. But the page is not loading (Unable to connect).

     

    Can any one help on this.

     

    Regards,

    Sairam.

  • 8. Re: How to configure Oracle XE with Apache and SSL ?
    1012981 Newbie
    Currently Being Moderated

    Hi,

     

    Do we need to modify any Apex or Database related configuration as part of this?

     

    Thanks & Regards

  • 9. Re: How to configure Oracle XE with Apache and SSL ?
    jariola Guru
    Currently Being Moderated

    1012981 wrote:

     

    Hi,

     

    Do we need to modify any Apex or Database related configuration as part of this?

     

    Thanks & Regards

    Hi,

     

    It of course depending what kind setup you are trying to get.

     

    If you are going to use reverse proxy to EPG, you do not need modify anything in database side.

    Only check that database is up and running.

     

    Regards,

    Jari

  • 10. Re: How to configure Oracle XE with Apache and SSL ?
    1012981 Newbie
    Currently Being Moderated

    Hi Jariola,

     

    We are using reverse proxy to EPG and data base is up and running.

    as i posted earlier,

    the url is redirecting but page is not loading.

    when we type 'mydomain.com' it is redirecting to ‘https://mydomine/apex/f?p=100:1’

    Apache started and running.

     

    here is more details -

    Oracle XE (10g) database

    EPG

    APEX 4.2

    Apache2 (OpenSSL)

    Generated certificate using Symantec

     

    Thanks & Regards

  • 11. Re: How to configure Oracle XE with Apache and SSL ?
    1012981 Newbie
    Currently Being Moderated

    Hi Jari,

     

    Here is my modification to HTTPD.conf --

     

    <VirtualHost *:80>

       ServerAdmin admin@domine.com               

       DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"

       ServerName apex-win.domine.com

       ErrorLog logs/error_log

     

    <IfModule !mod_rewrite.c>                                                    

     

    LoadModule rewrite_module modules/mod_rewrite.so                             

     

    </IfModule>                                                                  

     

    <IfModule mod_rewrite.c>                                                     

     

    RewriteEngine on                                                             

    ReWriteCond %{SERVER_PORT} !^443$                                            

    RewriteRule ^/(.*) https://%{HTTP_HOST}/apex/f?p=100:1 [NC,R,L]                

    RewriteRule / https://%{HTTP_HOST}/apex/f?p=100:1 [NC,R,L]    

                

     

    </IfModule>

     

    <IfModule !proxy_module.c>

    LoadModule proxy_module modules/mod_proxy.so

    </IfModule>

    <IfModule proxy_module.c>

    ProxyRequests Off

    <Proxy *>

    Order deny,allow

    Allow from all

    </Proxy>

     

    ProxyPass /i http://localhost:8080/i

    ProxyPassReverse /i  http://localhost:8080/i

    ProxyPass / http://localhost:8080/

    ProxyPassReverse / http://localhost:8080/

    </IfModule>

     

    </VirtualHost>

     

    I have also included KEY and Certificate in SSL.conf.

     

    Thanks and Regards,

    Sairam

  • 12. Re: How to configure Oracle XE with Apache and SSL ?
    jariola Guru
    Currently Being Moderated

    Hi,

     

    And your SSL.conf is ?

     

    Still, I think you get better support from HTTPD documentation or specific forum.

     

    Regards,

    Jari

     

    Message was edited by: jariola

     

    And maybe this helps

    http://davidghedini.blogspot.fi/2009/02/https-for-oracle-application-express-on.html

  • 13. Re: How to configure Oracle XE with Apache and SSL ?
    1012981 Newbie
    Currently Being Moderated

    Hi Jari,

     

    Thank you for you suggestion. I will post this in apache realted fourms.

     

    I have followed the same link.

     

    Thanks & Regards

    Sairam

  • 14. Re: How to configure Oracle XE with Apache and SSL ?
    ApexPhil Journeyer
    Currently Being Moderated

    Yes you do need to configure Apex. There is an SSL setting.

     

    If you're also calling external services using SSL then it's more complicated. You need to change an Apex instance setting, configure Oracle Wallet and set up ACL.

1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points