Chapter 5. Configuring Red Hat Enterprise IPA to run as an Apache Virtual Host

Chapter 5. Configuring Red Hat Enterprise IPA to run as an Apache Virtual Host

If you have a standard Apache instance running on port 80, you can configure Red Hat Enterprise IPA to run on a secondary port, for example, on port 8089. You should be aware, however, that in this configuration, IPA does not use SSL; all requests will use standard HTTP.

The following procedure assumes that IPA is configured to run on port 80, and that you want to move it to port 8089.

Procedure 5.1. To configure IPA to run on port 8089:
  1. Log in as the root user.

  2. Edit the /etc/httpd/conf.d/ipa.conf file. Add the following three lines to the top of the file:

    Listen 8089
    NameVirtualHost *:8089
    <VirtualHost *:8089>
    
  3. Add the following line to the end of the file:

    </VirtualHost>
    

    This wraps the entire IPA configuration in a virtual host, and ensures that Apache is listening to that port.

    Note

    You cannot use port 8080. This port is used by the ipa_webgui service.

  4. Comment out the following rewrite rules from the /etc/httpd/conf.d/ipa.conf file:

    ----------------------------------------------------------------------
    # Redirect to the fully-qualified hostname. Not redirecting to secure
    # port so configuration files can be retrieved without requiring SSL.
    RewriteCond %{HTTP_HOST}    !^host.foo.com$ [NC]
    RewriteRule ^/(.*)          http://host.foo.com/$1 [L,R=301]
    
    # Redirect to the secure port if not displaying an error or retrieving
    # configuration.
    RewriteCond %{SERVER_PORT}  !^443$
    RewriteCond %{REQUEST_URI}  !^/(errors|config|favicon.ico)
    RewriteRule ^/(.*)          https://host.foo.com/$1 [L,R=301,NC]
    ---------------------------------------------------------------------
    
  5. Reload the httpd service.

    # service httpd reload

This configures Red Hat Enterprise IPA to run on port 8089, leaving port 80 free for your normal web site.