Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Once OpenSSL is installed, enter the following commands (changing &ltopenssl<openssl_dir> to the proper path for the OpenSSL installation directory) at the command line to generate the certificate key. The example uses 1024 bit encryption; if required, you can increase to your preferred value:

 

Code Block
cd &ltopenssl<openssl_dir>/bin 
openssl genrsa -des3 -out uptime_ssl_server.key 1024 
openssl req -new -key uptime_ssl_server.key -out uptime_ssl_server.csr 
openssl x509 -req -days 365 -in uptime_ssl_server.csr -signkey    
	uptime_ssl_server.key -out uptime_ssl_server.crt

...

Windows:
Open notepad and enter the following line where &ltyour<your_SSL_server_password> is the password for your generated certificate keys.

@echo &ltyour<your_SSL_server_password>

Save the file as passphrase.cmd.

Linux:
Open vim and enter the following lines; &ltyour<your_SSL_server_password> is the password for your generated certificate keys.

#!/bin/bash

echo "&ltyour<your_SSL_server_password>"

Save the file as passphrase.cmd.

...

Copy the following files to the &ltuptime<uptime_dir>/apache/conf directory where &ltuptime<uptime_dir> is the installation directory of up.time (the default installation directory is C:\Program Files\uptime software\uptime on Windows and /usr/local/uptime on Linux).

...

The following changes to the web server configuration file (httpd.conf) will allow it to use SSL.

Open &ltuptime<uptime_dir>/apache/conf/httpd.conf for editing. Where &ltuptime<uptime_dir> appears below, change it to reflect the directory where you have up.time installed (ex. c:/Program Files/uptime software/uptime). All path slashes in httpd.conf need to be forward slashes (rather than the usual backslash that is used in Windows).

...

On Linux installations, the mod_rewrite.so module is not bundled with up.time, so it is necessary to download and copy the mod_rewrite.so file from the bottom of this article to the &ltuptime<uptime_dir>/apache/modules directory. Then, in httpd.conf, add the following line after "# LoadModule foo_module modules/mod_foo.so". If issues are experienced with the version of mod_rewrite.so attached, try creating a symlink to the mod_rewrite.so file provided by the Linux distribution instead.

...

Finally, the last part is to add entries in httpd.conf that will rewrite the requests as HTTPS. At the bottom of the httpd.conf file, add these lines, changing &ltuptime<uptime_dir> to the directory of your up.time installation:

SSLMutex default
SSLPassPhraseDialog "exec:&ltuptime<uptime_dir>/apache/conf/passphrase.cmd"
SSLSessionCache none
&ltVirtualHost
<VirtualHost *:80>
 RewriteEngine on
 RewriteCond %{SERVER_PORT} !^443$
 RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [NC,R,L]
</VirtualHost>
&ltVirtualHost
<VirtualHost *:443>
 SSLEngine on
 DocumentRoot "&ltuptime<uptime_dir>/GUI"
 SSLCertificateFile "&ltuptime<uptime_dir>/apache/conf/uptime_ssl_server.crt"
 SSLCertificateKeyFile "&ltuptime<uptime_dir>/apache/conf/uptime_ssl_server.key"\t
</VirtualHost>
&ltVirtualHost
<VirtualHost *:9999>
 RewriteEngine on
 RewriteCond %{SERVER_PORT} !^443$
 RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [NC,R,L]
</VirtualHost>

Update uptime.conf

Open the &ltuptime<uptime_dir>/uptime.conf file for editing and change the httpContext parameter (which begins with "httpContext=http://") to relfect the use of SSL:

httpContext=https://&ltServer<Server_Hostname>:9999

Restart the services

...