Skip to content

Instantly share code, notes, and snippets.

@unhammer
Created November 24, 2014 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unhammer/af6bea94b723bf27476e to your computer and use it in GitHub Desktop.
Save unhammer/af6bea94b723bf27476e to your computer and use it in GitHub Desktop.
config snippets for how to run ocsigen/eliom behind an ssl-enabled apache
# The apache server is SSL-enabled, passes requests that hit /thesubdir to localhost:8080 over http
ProxyPreserveHost On
ProxyRequests Off
<Location "/thesubdir">
ProxyPass http://0.0.0.0:8080/thesubdir
ProxyPassReverse http://0.0.0.0:8080/thesubdir
</Location>
<!-- The ocsigen server runs on 8080, plain http.
We wouldn't need any specific changes except eliom adds this <base href="http://$hostname"> element, which
we can override to "https://$hostname/thesubdir" by setting defaultprotocol and <site>: -->
<host defaultprotocol="https" hostfilter="*">
<site path="thesubdir">
<static dir="/usr/local/var/www/foo/static" />
<static dir="/usr/local/var/www/foo/eliom" />
<eliommodule module="/usr/local/lib/foo/foo.cma"/>
<eliom/>
</site>
</host>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment