Wiki Forum Sign up! Explore Home

Not signed in (Sign In)

LiveSearch

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.2 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorslifox
    • CommentTimeApr 24th 2007 edited
     permalink
    I used the following apache configuration lines to achieve a secure proxy for my server's local clockingit installation:

    This will redirect requests for http://server.my_domain.com to https://server.my_domain.com
    and will proxy requests for https://server.my_domain.com to http://hostname.clockingit.com:3000 on the localhost
    The end-user who is contacting server.my_domain.com does not know that the request is being proxied, because apache will change the "Host:" values to itself as it sends back the response. The proxy request is performed on the localhost, which is informed by /etc/hosts that hostname.clockingit.com points to 127.0.0.1

    This is not a clean way to do this, and the source should be modified to remove the hard-coded domain clockingit.com, and to allow for secure SSL connections. Until then, this might be useful to include in the README.

    Alex

    ### Insecure VirtualHost ###
    <VirtualHost *:80>
    ServerAdmin root@my_domain.com
    ServerName server.my_domain.com
    UseCanonicalName Off
    # Force clients from the Internet to use HTTPS
    RewriteEngine on
    RewriteRule ^/?(.*)$ https://server.my_domain.com/$1 [L,R]
    </VirtualHost>

    ### SSL VirtualHost ###
    <VirtualHost *:443>
    ServerAdmin root@my_domain.com
    ServerName server.my_domain.com
    UseCanonicalName Off
    SSLCertificateFile /home/clockingit/ssl.cert.pem
    SSLCertificateKeyFile /home/clockingit/ssl.key.pem

    ProxyRequests Off
    <Proxy *>
    Order Allow,Deny
    Allow from all
    </Proxy>
    RewriteEngine On
    RewriteRule ^/(.*)$ http://hostname.clockingit.com:3000/$1 [P,NC]
    ProxyPassReverse / http://hostname.clockingit.com:3000/
    </VirtualHost>
    • CommentAuthoradmin
    • CommentTimeApr 24th 2007
     permalink
    I'll get to removing the hardcoded references to clockingit.com soon, but in the mean time, this might be a good solution for people wanting to host themselves.

    Thanks for the example, I'll add something to the README file.