# How to create https

**URL:** https://community.wowza.com/t/how-to-create-https/94591
**Category:** Wowza Streaming Engine
**Created:** [February 12, 2022, 11:14pm UTC](https://community.wowza.com/t/how-to-create-https/94591 "2022-02-12T23:14:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![aime\_biamou](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@aime\_biamou](https://community.wowza.com/u/aime_biamou)
#### Post date: [February 12, 2022, 11:14pm UTC](https://community.wowza.com/t/how-to-create-https/94591/1 "2022-02-12T23:14:38Z")

</div>

hello i search how to have https in my server wowza please

---

<div class="post-metadata">

### Author: ![Connessione](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Connessione](https://community.wowza.com/u/Connessione)
#### Post date: [February 13, 2022, 4:28am UTC](https://community.wowza.com/t/how-to-create-https/94591/2 "2022-02-13T04:28:09Z")

</div>

Check out [these](https://www.wowza.com/docs/ssl) articles. You will need to use streamlock here.

_Note: this is different from have https in your regular website (web pages)._

---

<div class="post-metadata">

### Author: ![7450ef049f92ac543091](https://avatars.discourse-cdn.com/v4/letter/7/ec9cab/32.png) [@7450ef049f92ac543091](https://community.wowza.com/u/7450ef049f92ac543091)
#### Post date: [November 21, 2022, 10:41am UTC](https://community.wowza.com/t/how-to-create-https/94591/4 "2022-11-21T10:41:18Z")

</div>

Hello,  
I have a method after trying this you will be eligible to create https easily.  
To create an HTTPS server, you need two things: an SSL certificate, and built-in `https` Node.js module.

We need to start out with a word about SSL certificates. Speaking generally, there are two kinds of certificates: those signed by a ‘Certificate Authority’, or CA, and ‘self-signed certificates’. A Certificate Authority is a trusted source for an SSL certificate, and using a certificate from a CA allows your users to trust the identity of your website. In most cases, you would want to use a CA-signed certificate in a production environment - for testing purposes, however, a self-signed certificate will do just fine.

To generate a self-signed certificate, run the following in your shell:

```auto
openssl genrsa -out key.pem
openssl req -new -key key.pem -out csr.pem
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
rm csr.pem

```

This should leave you with two files, `cert.pem` (the certificate) and `key.pem` (the private key). Put these files in the same directory as your Node.js server file. This is all you need for a SSL connection. So now you set up a quick hello world example (the biggest difference between https and is the `options` parameter):

```auto
const https = require('https');
const fs = require('fs');

const options = {
  key: fs.readFileSync('key.pem'),
  cert: fs.readFileSync('cert.pem')
};

https.createServer(options, function (req, res) {
  res.writeHead(200);
  res.end("hello world\n");
}).listen(8000);

NODE PRO TIP: Note `fs.readFileSync` - unlike `fs.readFile` , `fs.readFileSync` will block the entire process until it completes. In situations like this - loading vital configuration data - the `sync` functions are okay. In a busy server, however, using a synchronous function during a request will force the server to deal with the requests one by one!

> To start your https server, run `node app.js` (here, app.js is name of the file) on the terminal.

Now that your server is set up and started, you should be able to get the file with curl:

```

If it does not work you can even try another method that is Edirtorsmodapk
