You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

\n \n \n \n \n \n \n \n \n \n \n
Version of up.time affectedAffected Platforms
AllAll
\n \n

Configuring SSL

\n

To configure SSL browsing in the up.time web interface, you must generate a server certificate, which identifies that server is using SSL for security, and perform some platform-specific configuration. The following steps will cover this process.

\n \n
    \n
  1. Generate or obtain a server certificate.
  2. \n

    You can purchase a recognized certificate from a vendor such as Verisign or Thawte.

    \n \n

    Alternately, you can generate your own non-recognized certificate. A non-recognized certificate is one that does not come from a certificate-issuing authority. To generate a non-recognized certificate, download and install the OpenSSL software. OpenSSL binaries for Windows can be obtained from Shining Light Productions.

    \n \n

    Once OpenSSL is installed, enter the following commands (changing &ltopenssl_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:

    \n \n
    cd &ltopenssl_dir>/bin
    \nopenssl genrsa -des3 -out uptime_ssl_server.key 1024
    \nopenssl req -new -key uptime_ssl_server.key -out uptime_ssl_server.csr
    \nopenssl x509 -req -days 365 -in uptime_ssl_server.csr -signkey 
    \n   uptime_ssl_server.key -out uptime_ssl_server.crt
    \n \n \n

  3. Create a passphrase file.
  4. \n

    Create a passphrase file containing your SSL server password specified in the previous step. The up.time Web Server will require the password each time it restarts but a passphrase file will automate the request, so user intervention is not necessary.

    \n \n

    Windows:
    \nOpen notepad and enter the following line where &ltyour_SSL_server_password> is the password for your generated certificate keys.

    \n

    @echo &ltyour_SSL_server_password>

    \n

    Save the file as passphrase.cmd.

    \n \n

    Linux:
    \nOpen vim and enter the following lines; &ltyour_SSL_server_password> is the password for your generated certificate keys.

    \n

    #!/bin/bash \n
    \n
    echo "&ltyour_SSL_server_password>"

    \n

    Save the file as passphrase.cmd.

    \n

    Make the file executable.

    \n
    chmod +x passphrase.cmd
    \n \n \n \n

  5. Move the files to the up.time directory.
  6. \n

    Copy the following files to the &ltuptime_dir>/apache/conf directory where &ltuptime_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).

    \n \n
      \n
    • uptime_ssl_server.key
    • \n
    • uptime_ssl_server.crt
    • \n
    • passphrase.cmd
    • \n
    \n \n \n

  7. Update httpd.conf.
  8. \n

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

    \n

    Open &ltuptime_dir>/apache/conf/httpd.conf for editing. Where &ltuptime_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).

    \n \n

    To make browsing to the up.time UI easy for users, have it listen on the default up.time UI port, 9999, as well as the typical HTTP and HTTPS ports, 80 and 443. \n
    Above the line "Listen 9999", add the following two lines:

    \n

    Listen 80 \n
    Listen 443

    \n \n

    To handle requests on each of these ports, 80, 443, and 9999, and redirect (actually rewrite) them properly, we will leverage the mod_rewrite.so module, so we need to enable it.

    \n

    On Windows installations, uncomment the following two lines in httpd.conf.

    \n

    LoadModule rewrite_module modules/mod_rewrite.so

    \n

    LoadModule ssl_module/mod_ssl.so

    \n \n

    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_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.

    \n

    LoadModule rewrite_module modules/mod_rewrite.so

    \n \n

    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_dir> to the directory of your up.time installation:

    \n

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

    \n \n \n

  9. Update uptime.conf.
  10. \n

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

    \n

    httpContext=https://&ltServer_Hostname>:9999

    \n \n \n

  11. Restart the services.
  12. \n

    For the changes to take effect, restart the up.time Data Collector and up.time Web Server on Windows or uptime_core and uptime_httpd on Linux.

    \n \n

    Windows: \n
    Restart the up.time Data Collector" service. \n
    Restart the "up.time Web Server" service.

    \n \n

    Linux:

    \n
    service uptime_core restart
    \nservice uptime_httpd restart
    \n
  • No labels