Knowledge Base
Searching in : Article
ID: AR07P00986
Applies to: NoMachine Server
Added on: 2018-07-04
Last Update: 2021-03-04

How to disable web connections by HTTPS and use only HTTP in version 6.9 and earlier

This article refers to NoMachine software which supports browser-based connections. For version 6.10 or later, please refer to http://www.nomachine.com/AR03S01112.

The NoMachine web server, nxhtd, which is a minimal Apache web server, is configured by default to redirect all HTTP requests to secure HTTPS.

Even if this is the advisable configuration in almost cases, administrators may wish to connect NoMachine web sessions only by HTTP.

These are the steps to disable HTTPS in nxhtd.


Step 1 - Stop nxhtd.

For example on Linux, run from command line:

sudo /etc/NX/nxserver --stop nxhtd

Step 2 - Edit the /usr/NX/etc/htd.cfg file and looks for the following lines:
 
<VirtualHost _default_:*>
RewriteEngine on

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

 

Comment them by pre-pending a #,  to disable the redirect directive.

These lines, after commenting them, should look like:

 
#<VirtualHost _default_:*>
#RewriteEngine on
#
#        ReWriteCond %SERVER_PORT !^4443$
#        RewriteRule ^/(.*) https://%SERVER_ADDR:4443/nxwebplayer [R,L]
#</VirtualHost>

 

Step 3 -  Start nxhtd

For example on Linux:

sudo /etc/NX/nxserver --start nxhtd

Note:

In order to use HTTP, type in the browser, for example:
http://127.0.0.1:4080

HTTPS is still available if requested explicitly, e.g.:
https://127.0.0.1:4443/nxwebplayer

127.0.0.1 is just an example, it has to be replaced with the proper IP or hostname of the server host.