Afterwards we can click on "Confirm security exemption" and should now finally be able to see our website via the HTTPS URL.Mac OS X doesn't ship with its own copy of MySQL, nor does Sequel Pro. In the dialogue that opens up, we should activate the option "Permanently save this exception", otherwise we will be asked again with each call. For our purposes that would of course be exaggerated, so we can confidently click on the button "Add an exception. The reason is that we have created the certificate on our own and Firefox only trusts certificates from official certification authorities. did not properly configure the site, Firefox did not connect to the site to protect your information from theft." In short, we can not just visit our website. The Firefox browser provides the dissuasive text "The owner of.
However, if we call our website via the browser, we may receive the error message "This connection is not secure" with error code SEC_ERROR_UNKNOWN_ISSUER (depending on browser and browser settings). For this, we open the XAMPP Control Panel and click on "Stop" behind the module "Apache" and then on "Start", so that the server restarts with the new configuration. Restart Apacheįor our changes to take effect, we must now restart Apache. Each additional domain or URL must be defined in exactly the same way, we can write any number of blocks of this type among each other. In the example here we have only defined one URL that should be reachable via HTTP and HTTPS. As you can see, we have defined the folders where our certificate has just been stored. This tells the server where to find the appropriate files. In addition, we still need to provide information about our SSL certificate and key. The DocumentRoot directory, ServerName, and ServerAlias specifications are identical. The HTTPS requests are defined via the second block. SSLCertificateKeyFile "conf/ssl.key/server.key"
SSLCertificateFile "conf/ssl.crt/server.crt" Under DocumentRoot we can specify the root directory. The first block applies to all requests over port 80 and looks something like the blocks from the first tutorial. In the following, we'll define the URL, which can then be called with both and afterwards. In the next step, we have to set up a new VirtualHost for each domain within the file C:\xampp\apache\conf\extra\nf similar to what we did in the first tutorial.Īt this point, it's important to know that HTTP is running on port 80, but SSL is on port 443. The ready certificate was placed in the folders C:\xampp\apache\conf\ssl.crt and C:\xampp\apache\conf\ssl.key, provided we installed XAMPP in C:\xampp. Now our certificate has been created and this step is done. server FQDN or YOUR name) :localhostĮmail Address enter the following 'extra' attributes Organizational Unit Name (eg, section) :WEBĬommon Name (e.g. If you enter '.', the field will be left blank. There are quite a few fields but you can leave some blankįor some fields there will be a default value, What you are about to enter is what is called a Distinguished Name or a DN.
You are about to be asked to enter information that will be incorporated The whole procedure looks like this: Generating a 2048 bit RSA private key
Finally we have to repeat the password from the beginning again, then the certificate is created. As a "Common Name" we enter the name of our URL. This information will be used later in our certificate. Here we can basically enter what we want or type in a point if we want to leave the field blank. Further questions follow, such as country (Country Name) or company (Organization Name). Here we can enter any password of our desire and then repeat it. First we have to enter a password for our key, that should look like this. In this folder we find the file makecert.bat, with a double-click on the file we can start the script.Īfter starting the script, the command line opens, where we only need to follow the instructions.
Luckily, XAMPP already has a little script ready for us that we can use and open like this: Create Certificateįirst, we have to create our own SSL certificate. In order to allow also HTTPS, the following steps are necessary additionally.
After this setup, all domains can only be accessed via HTTP.
In my tutorial about virtual domains, I had already explained the basics of how to define domains with XAMPP and Apache, which can then point to a local directory in the XAMPP installation.