Knowledge Base
Searching in : Article
ID: AR05P00979
Applies to: NoMachine Software
Added on: 2018-05-21
Last Update: 2018-05-21

How to hide the IP address that pops up in the browser after redirection to https

NoMachine servers include a small Apache-based web server, nxhtd, which can be configured via the htd.cfg file (NoMachine installation directory/etc/htd.cfg). By default, HTTP web connections are accepted on port 4080 and redirected to 4443 (HTTPS). Redirection is made by using the Apache module, mod_rewrite.

The related section in the htd.cfg file is:

<VirtualHost _default_:*>
RewriteEngine on

        ReWriteCond %SERVER_PORT !^4443$
        RewriteRule ^/(.*) https://%SERVER_ADDR:4443/nxwebplayer [R,L]

 RewriteRule ^/(.*) https://%SERVER_ADDR:4443/nxwebplayer [R,L]
</VirtualHost>

 

You may change the RewriteRule line and provide hostname instead than IP:

RewriteRule ^/(.*) https://<hostname>:4443/nxwebplayer [R,L]

For example:

RewriteRule ^/(.*) https://www.nomachine.com:4443/nxwebplayer [R,L]

 

For more information about the mod_rewrite module, we recommend to consult the official Apache documentation.

Some ref.: https://httpd.apache.org/docs/current/mod/mod_rewrite.html