How To: Automatically Redirect the Server Hostname to NodeWorx ============================================================== By default, navigating to ``https://{hostname.com}/nodeworx`` in the browser (replacing ``{hostname.com}`` with the corresponding information) will automatically redirect to ``https://{hostname.com}:2443/nodeworx`` . It is also possible to use the template system to automatically redirect ``https://{hostname.com}`` directly to ``https://{hostname.com}:2443/nodeworx``, if desired. .. contents:: Setting Up the Redirect ----------------------- #. Log in to the server at the CLI as root, either via SSH or from the terminal #. At the CLI, run the following--this will automatically open the template file in a text editor: .. code-block:: ~iworx/bin/config.pex --customize-template http/iworx-proxy --for-global #. Above the section titled ``# Reverse proxy section, webmail only for now. (Allows self-signed and expired SSLs)``, add the following lines, replacing ``hostname.com`` with the corresponding information and format for the server's hostname: .. code-block:: {literal} ## # Redirect hostname.com to https://hostname.com:2443/nodeworx ## RewriteCond %{HTTP_HOST} ^hostname\.com$ RewriteRule ^/?$ https://%{HTTP_HOST}:2443/nodeworx [R,L] {/literal} #. Save the file and exit the text editor #. Run the following to rewrite ``/etc/httpd/conf.d/iworx-proxy.conf``, and apply the template changes: .. code-block:: ~iworx/bin/httpd.pex --write-proxy-vhost #. Restart or reload Apache .. code-block:: systemctl restart httpd or .. code-block:: systemctl reload httpd