Hello,

This is not a direct question about Active4D, but as I know some of you have dealed with this problem, maybe you can help ...

We're trying to implement this scenario:

INTERNET -> www.foobar.com (Apache 1.3.33) --> 4D Client 2004.3 as web server
running on an OS X 10.4

Apache receives the pages in SSL, and proxy them in http (no secure) to our 4D Web server, 4D web server answers and again Apache return the page in SSL to the browser.

It works correctly, serving HTTTP and HTTPS pages. But in addition, we need to know which IP the remote client browser is using to connect with 4D_Webserver, in order to allow only one session per user.

Actually we obtain the IP of Apache proxy (our internal network address). And the instructions typed in mod_rewrite section seems not to work at all.

Why?

Here is our httpd.conf (cutting the main part):



Thanks in advance !!


Raimon Fernandez Sirera
Barcelona


#### httpd.conf
LoadModule rewrite_module     libexec/httpd/mod_rewrite.so
LoadModule proxy_module       libexec/httpd/libproxy.so
LoadModule ssl_module         libexec/httpd/libssl.so

AddModule mod_rewrite.c
AddModule mod_proxy.c
AddModule mod_ssl.c

# ------- Canviar els comentaris de les seguents linies per treure SSL
<IfModule mod_ssl.c>
        Listen 80
        Listen 443
        # Some MIME-types for downloading Certificates and CRLs
          AddType application/x-x509-ca-cert .crt
          AddType application/x-pkcs7-crl .crl

        # inintial Directives for SSL
          SSLProtocol all -SSLv3
          SSLPassPhraseDialog builtin
          SSLSessionCache dbm:/var/run/ssl_scache
          SSLSessionCacheTimeout 300
          SSLMutex file:/var/run/ssl_mutex
          SSLRandomSeed startup builtin
          SSLLog /var/log/httpd/ssl_engine_log          
          SSLLogLevel info

        # Virtual Host Context
        <VirtualHost *:80>
          #Just to keep things sane...
            DocumentRoot "/Library/WebServer/Documents"
            ServerName www.foobar.com
            ServerAdmin [EMAIL PROTECTED]
            SSLEngine off
                ProxyPass / http://www.foobar.com:8080/
                ProxyPassReverse / http://www.foobar.com:8080/
        </VirtualHost>

        <VirtualHost *:443>
          # General setup for the virtual host
            DocumentRoot "/Library/WebServer/Documents"
          #ServerName has to match the server you entered into the CSR
            ServerName www.foobar.com
            ServerAdmin [EMAIL PROTECTED]
            ErrorLog /var/log/httpd/error_log
            TransferLog /var/log/httpd/access_log
          # SSL Engine Switch:
          # Enable/Disable SSL for this virtual host.
            SSLEngine on
            #SSLProtocol all -SSLv3
                SSLProtocol SSLv3
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW: +SSLv2:+EXP:+eNULL
          # Path to your certificates and private key           
            SSLCertificateFile /etc/httpd/ssl.key/server.crt
            SSLCertificateKeyFile /etc/httpd/ssl.key/server.key
            SSLCACertificateFile /etc/httpd/ssl.key/ca.crt
            <Files ~ "\.(cgi|shtml|phtml|php3?)$">
              SSLOptions +StdEnvVars
            </Files>
            <Directory "/Library/WebServer/CGI-Executables">
              SSLOptions +StdEnvVars
            </Directory>
        # correction for browsers that don't always handle SSL connections well
            SetEnvIf User-Agent ".*MSIE.*" \
            nokeepalive ssl-unclean-shutdown \
            downgrade-1.0 force-response-1.0
        # Per-Server Logging:
        # The home of a custom SSL log file. Use this when you want a
        # compact non-error SSL logfile on a virtual host basis.
            CustomLog /var/log/httpd/ssl_request_log \
            "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
                ProxyPass / http://www.foobar.com:8080/
                ProxyPassReverse / http://www.foobar.com:8080/
# Module rewrite only for 443
                <IfModule mod_rewrite.c>
                    RewriteEngine On
                    #RewriteCond %{REQUEST_METHOD}.* [NC]
                    #RewriteRule ^/(.*)$ http://192.168.0.153/$1 [L,P]
RewriteRule ^/(.*)$ http://www.foobar.com:8080/?id=% {REQUEST_URI}$1 [NC,L]
                        #RewriteCond %{REQUEST_METHOD} ^TRACE
                    #RewriteRule .* - [F]
                </IfModule>
        </VirtualHost>
</IfModule>


_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to