Skip to content

Instantly share code, notes, and snippets.

@terryjray
Last active December 8, 2020 11:11
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 terryjray/7582782 to your computer and use it in GitHub Desktop.
Save terryjray/7582782 to your computer and use it in GitHub Desktop.
Configuring mod_proxy on apache for JBoss on CentOS 6.4
# add or un-comment these mods in the /etc/httpd/conf/httpd.conf
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
<Location />
Order allow,deny
Allow from all
</Location>
# make sure you configure SELinux to allow HTTPD to do the proxy, from the console as root or sudo
setsebool -P httpd_can_network_connect 1
# if you want to restrict access to port 80, make sure your iptables are restricting access to 8080
iptables -A INPUT -p tcp --destination-port 8080 -j DROP
service firewall restart
service jboss restart
service httpd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment