Skip to content

Instantly share code, notes, and snippets.

@claylo
Created April 15, 2011 19:30
Show Gist options
  • Save claylo/922309 to your computer and use it in GitHub Desktop.
Save claylo/922309 to your computer and use it in GitHub Desktop.
Perform the three steps to get Crowd to be ready to proxy, and accessible only via localhost.
# we'll only have IPv4 addresses to look for
sed -i -e 's/UTF-8/UTF-8 -Djava.net.preferIPv4Stack=true/' crowd/apache-tomcat/bin/setenv.sh
# block anyone not on localhost IP
sed -i -e '/<Context>/ a\
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\\.0\\.0\\.1" />' crowd/apache-tomcat/conf/context.xml
# make sure Tomcat knows it's behind a proxy.
# UPDATE THIS FOR YOUR ATLASSIAN SUITE SERVER HOSTNAME
sed -i -e 's/<Connector/<Connector proxyHost="atlassian.example.com" proxyPort="443" scheme="https"/' crowd/apache-tomcat/conf/server.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment