# AWS deploy (v.2.15.0, CloudFormation) - 404 Not Found - nginx 1.18

**URL:** <https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124>\
**Category:** Issues with deployment\
**Tags:** v2\
**Created:** [October 7, 2020, 7:58pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124 "2020-10-07T19:58:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![israelws](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/israelws/32/1022_2.png) [@israelws](https://openvidu.discourse.group/u/israelws)\
**Post date:** [October 7, 2020, 7:58pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/1 "2020-10-07T19:58:07Z")

</div>

Hi All,  
I deployed OpenVidu on AWS (ver. 2.15.0) following the CloudFormation walkthrough on OpenVidu docs.

After setting all the params, I got the aws instance running, but when I tried to access the service with the public IP or with the Domain name, I’m getting the following error:

# 404 Not Found - nginx 1.18

I have another instance on AWS running OpenVidu ver. 2.14.0, and it is working fine, when going to the server IP or domain name, I’m getting:

# Welcome to OpenVidu Server

Can someone help me resolve this issue?

Many thanks

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [October 8, 2020, 9:47am UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/2 "2020-10-08T09:47:32Z")

</div>

Hi @israelws, what parameters are you using for your Cloudformation? Can you ssh into the instance and go to `/opt/openvidu` and execute:

`./openvidu logs`

Regards,  
Carlos

---

<div class="post-metadata">

**Author:** ![israelws](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/israelws/32/1022_2.png) [@israelws](https://openvidu.discourse.group/u/israelws)\
**Post date:** [October 8, 2020, 11:12am UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/3 "2020-10-08T11:12:49Z")

</div>

Hi Carlos,  
please find the following image from the AWS server:

 ![Screen Shot 2020-10-08 at 14.08.26](https://global.discourse-cdn.com/free1/uploads/openvidu/original/2X/a/ad97e688a2b4095b90164b39d8577a1de657a0af.png)

It looks like the server started correctly, but the Nginx service may not route the incoming requests to the openvidu service.

Thanks,  
Israel

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [October 8, 2020, 11:52am UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/4 "2020-10-08T11:52:26Z")

</div>

Could you please show me your NGINX logs?. Maybe restart all the services solve your problem.

```auto
cd /opt/openvidu
sudo ./openvidu restart

```

Or maybe there’s something wrong in the configuration. What parameters do you have in your .env file? (Hide your secret)

Regards,  
Carlos

---

<div class="post-metadata">

**Author:** ![israelws](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/israelws/32/1022_2.png) [@israelws](https://openvidu.discourse.group/u/israelws)\
**Post date:** [October 8, 2020, 3:34pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/5 "2020-10-08T15:34:26Z")

</div>

I just tried this, restart logs are ok. after the same issue still exists.

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [October 8, 2020, 3:46pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/6 "2020-10-08T15:46:15Z")

</div>

Please, what parameters did you use in your cloudformation and what region are you using? It is just to tests in my own AWS account what the problem could be.

Regards,  
Carlos

---

<div class="post-metadata">

**Author:** ![israelws](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/israelws/32/1022_2.png) [@israelws](https://openvidu.discourse.group/u/israelws)\
**Post date:** [October 8, 2020, 4:46pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/7 "2020-10-08T16:46:49Z")

</div>

These are the parameters I used:  
Instance type: t2.xlarge  
KeyName: (my SSH key)  
LetsEncryptEmail : [isralog@gmail.com](mailto:isralog@gmail.com) (I used LetsEncrypt)  
MyDomainName: [ovd.cmt.biz](http://ovd.cmt.biz)

---

<div class="post-metadata">

**Author:** ![israelws](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/israelws/32/1022_2.png) [@israelws](https://openvidu.discourse.group/u/israelws)\
**Post date:** [October 8, 2020, 4:47pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/8 "2020-10-08T16:47:58Z")

</div>

I also used this template for the deployment:  
[https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/CF-OpenVidu-latest.yaml](https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/CF-OpenVidu-latest.yaml)

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [October 8, 2020, 5:02pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/9 "2020-10-08T17:02:43Z")

</div>

From what I can see in your logs, I think you’ve filled the Cloudformation template with **selfsigned** in **Certificate type** , but you must use **letsencrypt** in the certificate type. You also need an Elastic IP. Check this example and check what type of certificate you have used and if you’re using an Elastic IP:

> **[OpenVidu Docs](https://docs.openvidu.io/en/2.15.0/openvidu-pro/deployment/aws/#2-lets-encrypt-certificate)**

---

<div class="post-metadata">

**Author:** ![israelws](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/israelws/32/1022_2.png) [@israelws](https://openvidu.discourse.group/u/israelws)\
**Post date:** [October 8, 2020, 5:20pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/10 "2020-10-08T17:20:28Z")

</div>

I did use LetsEncrypt, SelfedSigned is the default, but I changed it.  
Once defined, the AWS CloudFormation is assigning ElasticIP.

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [October 8, 2020, 5:39pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/11 "2020-10-08T17:39:57Z")

</div>

Did you update it through CloudFormation?

After deploying with CloudFormation, if you need to change anything of the configuration, some changes will not apply using the control panel of Cloudformation. There’s some scripting in the OpenVidu EC2 instance and this kind of changes are not detected by cloudformation. You need to ssh into OpenVidu EC2 instance and edit the file located in `/opt/openvidu/.env` and change these parameters:

```auto
DOMAIN_OR_PUBLIC_IP=ovd.cmt.biz

CERTIFICATE_TYPE=letsencrypt

LETSENCRYPT_EMAIL=isralog@gmail.com

```

And restart openvidu as you know.

If you still having problems with certificate, try to remove the directory `/opt/openvidu/certificates` and restart again.

I hope this helps.  
Regards,  
Carlos

---

<div class="post-metadata">

**Author:** ![Marco\_Flores](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/marco_flores/32/1030_2.png) [@Marco\_Flores](https://openvidu.discourse.group/u/Marco_Flores)\
**Post date:** [October 10, 2020, 6:20pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/12 "2020-10-10T18:20:12Z")

</div>

estoy en el mismo problema y ni con la version 2.14 me funciona ☹

 ![image](https://global.discourse-cdn.com/free1/uploads/openvidu/original/2X/0/0bb4d1de873c005e11ac617ea43c48b4d69e8490.png)

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [October 10, 2020, 6:33pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/13 "2020-10-10T18:33:00Z")

</div>

@Marco_Flores what configuration do you have in your /opt/openvidu/.env? Do you have a configured Domain name? If you’re using letsencrypt as @israelws you must have a domain name pointing to the public Ip of your instance.

Please @israelws, how is your deployment going?

Regards,  
Carlos

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [October 10, 2020, 6:40pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/14 "2020-10-10T18:40:36Z")

</div>

Please, check these examples of configuration:

> **[OpenVidu Docs](https://docs.openvidu.io/en/2.15.0/deployment/deploying-aws/#domain-and-ssl-configuration-examples)**

---

<div class="post-metadata">

**Author:** ![Marco\_Flores](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/marco_flores/32/1030_2.png) [@Marco\_Flores](https://openvidu.discourse.group/u/Marco_Flores)\
**Post date:** [October 10, 2020, 6:50pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/15 "2020-10-10T18:50:55Z")

</div>

seguí esa documentación. que es la oficial de openvidu.

 ![image](https://global.discourse-cdn.com/free1/uploads/openvidu/original/2X/f/f6d4c68ba97037455799d4b9815d398207c98c34.png)  
certificate\_type: letsencrypt  
email: [m.flores.ramirez1705@gmail.com](mailto:m.flores.ramirez1705@gmail.com)  
https\_port=443

---

<div class="post-metadata">

**Author:** ![Marco\_Flores](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/marco_flores/32/1030_2.png) [@Marco\_Flores](https://openvidu.discourse.group/u/Marco_Flores)\
**Post date:** [October 10, 2020, 6:52pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/16 "2020-10-10T18:52:26Z")

</div>

esto es en mi pila en aws, lo primero que se crea para que de la salida:

| InstanceType | t2.xlarge | - |
| --- | --- | --- |
| KeyName | SK01 | - |
| LetsEncryptEmail | [m.flores.ramirez1705@gmail.com](mailto:m.flores.ramirez1705@gmail.com) | - |
| MyDomainName | [goijob.atwebpages.com](http://goijob.atwebpages.com) | - |
| OpenViduSecret | \*\*\*\* | - |
| OwnCertCRT | - | - |
| OwnCertKEY | - | - |
| PublicElasticIP | 54.92.236.226 | - |
| WantToDeployDemos | true | - |
| WantToSendInfo | true | - |
| WhichCert | letsencrypt | - |

---

<div class="post-metadata">

**Author:** ![Marco\_Flores](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/marco_flores/32/1030_2.png) [@Marco\_Flores](https://openvidu.discourse.group/u/Marco_Flores)\
**Post date:** [October 10, 2020, 6:56pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/17 "2020-10-10T18:56:35Z")

</div>

i do the example number 2.

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [October 10, 2020, 7:39pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/18 "2020-10-10T19:39:25Z")

</div>

@Marco_Flores the domain name you’re using is not pointing to 54.92.236.226  
 ![image](https://global.discourse-cdn.com/free1/uploads/openvidu/original/2X/e/eaaf1d1dc5a803545b26536e61f06adc1d8663eb.png)

If this is a domain used by other service you have, you need a new one for OpenVidu. For example you can create a subdomain like [openvidu.atwebpages.com](http://openvidu.atwebpages.com) and this subdomain must point to 54.92.236.226

When the Domain name is pointing to 54.92.236.226, change your DOMAIN\_OR\_PUBLIC\_IP to [openvidu.atwebpages.com](http://openvidu.atwebpages.com/) (if you configured that one) in your `/opt/openvidu/.env` file.

After that remove the folder `/opt/openvidu/certificates` and restart openvidu with `./openvidu restart`

Regards,  
Carlos

---

<div class="post-metadata">

**Author:** ![israelws](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/israelws/32/1022_2.png) [@israelws](https://openvidu.discourse.group/u/israelws)\
**Post date:** [October 11, 2020, 12:21pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/19 "2020-10-11T12:21:01Z")

</div>

thank you Carlos. That solved the problem!

I changed the param:  
“DOMAIN\_OR\_PUBLIC\_IP =”  
to the actual domain that I’m using (I did enter it during the CloudFormation setup).  
The value was the EC2 public ip4 DNS -\> [ec2-79-125-91-17.eu-west-1.compute.amazonaws.com](http://ec2-79-125-91-17.eu-west-1.compute.amazonaws.com)

After changing I restarted the openVidu service and it is working now.

It may. be something with the CloudFormation new script, that for some reason is not updating this param with the domain value that I entered (I repeated this process many times) .

Thanks again.  
Israel

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [October 11, 2020, 3:12pm UTC](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124/20 "2020-10-11T15:12:13Z")

</div>

Correct, that’s the problem. Unfortunately It is not possible to detect some changes in the cloudformation. We recommend to make changes directly in the .env file because of that.

Regards,  
Carlos

[Next page](https://openvidu.discourse.group/t/aws-deploy-v-2-15-0-cloudformation-404-not-found-nginx-1-18/2124.md?page=2)
