<docbook><section><title>VirtSetupSSLFileSystem</title><title> Guide for Setting Up the Virtuoso HTTPS Listener using File System to host Certificate and Public Key</title> Guide for Setting Up the Virtuoso HTTPS Listener using File System to host Certificate and Public Key
<para>To enable the HTTPS listener, you will need a certificate.
 Existing certificates may not have Subject Alternate Name, so you may want to acquire (or <ulink url="VirtGenerateX509Cert">generate</ulink>) a new one.</para>
<orderedlist spacing="compact"><listitem>Move newcert.pem, newkey.pem, and cacert.pem into the server&#39;s working directory.
 In our test case, we put the keys in a &#39;keys&#39; sub-directory, and added the following lines to the [HTTPServer] section of the Virtuoso INI file (default, virtuoso.ini): <programlisting>SSLPort                     = 4443
SSLCertificate              = ./keys/newcert.pem
SSLPrivateKey               = ./keys/newkey.pem
X509ClientVerifyCAFile      = ./keys/cacert.pem
X509ClientVerify            = 1
X509ClientVerifyDepth       = 15
</programlisting></listitem>
<listitem>Also in the Virtuoso INI file, in the [URIQA] section, DefaultHost (set to localhost:8890 below) must be edited to correspond to the DNS-resolvable host name (&quot;CNAME&quot;) of the Virtuoso host, combined with the ServerPort as set in the [HTTPServer] section of the same INI file.
 Default settings are seen here: <programlisting>[URIQA]
DynamicLocal = 1
DefaultHost  = localhost:8890
</programlisting>For instance, if the CNAME of the host is virtuoso.example.com, and the ServerPort is 4321, the DefaultHost should be set to virtuoso.example.com:4321 <programlisting>[URIQA]
DynamicLocal = 1
DefaultHost  = virtuoso.example.com:4321
</programlisting></listitem>
<listitem>Start the Virtuoso server, and look at the log file.
 Once HTTPS is up, you should see something like — <programlisting>HTTPS Using X509 Client CA ....
HTTPS/X509 server online at 4443
</programlisting> </listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2"> Setting Up Firefox</bridgehead>
<orderedlist spacing="compact"><listitem>In the <emphasis>Preferences</emphasis> dialog, open the <emphasis>Advanced</emphasis> tab, and the <emphasis>Encryption</emphasis> subtab; then, click the <emphasis>View certificates</emphasis> button.
<figure><graphic fileref="VirtSetupSSLFileSystem/Picture_1.png" /></figure> </listitem>
<listitem>Click the <emphasis>Add exception</emphasis> button, and enter the address of the HTTPS server you&#39;ve just configured, i.e.
 — <programlisting>https://virtuoso.example.com:4443/
</programlisting></listitem>
<listitem>Click OK, and confirm the exception.
<figure><graphic fileref="VirtSetupSSLFileSystem/Picture_2.png" /></figure> </listitem>
<listitem>Click to the <emphasis>Your Certificates</emphasis> tab, and import mycert.p12.</listitem>
</orderedlist></section></docbook>