azurewildfly

Apache integration with WildFly

The Bitnami package for WildFly includes the Apache Web server. By default, Apache is configured to act as a proxy that redirects HTTP and HTTPS requests to WildFly.

This integration is configured in three locations:

  • The mod_proxy_http.so modules are enabled in the /opt/bitnami/apache/conf/httpd.conf main configuration file.

  • A virtual host for HTTP requests is defined at /opt/bitnami/apache/conf/vhosts/wildfly-http-vhost.conf with the content below:

      <VirtualHost 127.0.0.1:80 _default_:80>
        ServerAlias *
        ProxyPass / http://127.0.0.1:8080/
        ProxyPassReverse / http://127.0.0.1:8080/
        <Location /console>
          Require local
          ErrorDocument 403 "For security reasons, Administration Console will be only available if you access it using 127.0.0.1 (localhost)"
        </Location>
      </VirtualHost>
    
  • A virtual host for HTTPS requests is defined at /opt/bitnami/apache/conf/vhosts/wildfly-https-vhost.conf with the content below:

      <VirtualHost 127.0.0.1:443 _default_:443>
        ServerAlias *
        SSLCertificateFile "/opt/bitnami/apache/conf/bitnami/certs/server.crt"
        SSLCertificateKeyFile "/opt/bitnami/apache/conf/bitnami/certs/server.key"
        ProxyPass / http://127.0.0.1:8080/
        ProxyPassReverse / http://127.0.0.1:8080/
        <Location /console>
          Require local
          ErrorDocument 403 "For security reasons, Administration Console will be only available if you access it using 127.0.0.1 (localhost)"
        </Location>
      </VirtualHost>
    
Last modification April 22, 2021